From nobody Tue Nov 11 22:32:22 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 From nobody Tue Nov 11 22:32:22 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=1566829310; cv=none; d=zoho.com; s=zohoarc; b=O46i2ZZv/Ei2YLbf6xqtIIHx1G9uzNU/IHjREsiYuEectDPAPUPdV/t76R/bdQIL2skPMwiFTIBBwedIjUTmvRuErR6aFgj6fpOeAugnaEeTavC8pcjrMA2+85n5syrPO9irRGg10KiORnkQuKCWJ6U/EWijFQfn23rkuhJbVdo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566829310; 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=Xo0O54+09yf5fGyREWDFWv1qIoWsHvjOkBhxPfgHEJQ=; b=KWaABmCX9vwwNXMjgxlgEF9jWg/uDO7VWPYsbOc0G7npjM5ggz1L9rjEB4RtsLfqw8wG1E87ejnp5GM6wcv+6t2d0s7Zig6CtQt3+2lpej+yE2SfZGF6jtgw+ITd0WlpMZLerNJOXsVj++3Az5RsiKNOa/phSTMwyIi5exEP9eg= 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 1566829310802489.5222677285997; Mon, 26 Aug 2019 07:21:50 -0700 (PDT) Received: from localhost ([::1]:53536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2FsT-0005z5-Bm for importer@patchew.org; Mon, 26 Aug 2019 10:21:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42521) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2Fp6-0003xB-No for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:18:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2Fp5-00083U-Mh for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:18:20 -0400 Received: from nsstlmta10p.bpe.bigpond.com ([203.38.21.10]:57504) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i2Fp5-00080C-36; Mon, 26 Aug 2019 10:18:19 -0400 Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep10p-svc.bpe.nexus.telstra.com.au with ESMTP id <20190826141814.RFAT6772.nsstlfep10p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com>; Tue, 27 Aug 2019 00:18:14 +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 5D2D11751058886B; Tue, 27 Aug 2019 00:18:14 +1000 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduvddrudehgedgjeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuffpveftpgfvgffnuffvtfetpdfqfgfvnecuuegrihhlohhuthemucegtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhonhihucfpghhuhigvnhcuoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecukfhppeehkedrudejfedrleekrdeikeenucfrrghrrghmpehhvghlohepuggsiidrthgvlhhsthhrrgdrtghomhdrrghupdhinhgvthepheekrddujeefrdelkedrieekpdhmrghilhhfrhhomhepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqpdhrtghpthhtohepoehjshhnohifsehrvgguhhgrthdrtghomheqpdhrtghpthhtohepoehkfiholhhfsehrvgguhhgrthdrtghomheqpdhrtghpthhtohepoehmrhgvihhtiiesrhgvughhrghtrdgtohhmqedprhgtphhtthhopeeoqhgvmhhuqdgslhhotghksehnohhnghhnuhdrohhrgheqpdhrtghpthhtohepoehqvghmuhdquggvvhgvlhesnhhonhhgnhhurdhorhhgqedprhgtphhtthhopeeothhonhihrdhnghhuhigvnhessghtrdgtohhmqeenucevlhhushhtvghrufhiiigvpedt 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:28 +1000 Message-Id: <2a1a5d52f1d6a44151e2e486653d47835151e649.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.10 Subject: [Qemu-devel] [PATCH 02/19] hw/block: 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: Kevin Wolf , Tony Nguyen , John Snow , qemu-block@nongnu.org, Max Reitz 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 ununsed, re-declare as DEVICE_HOST_ENDIAN. - if max/min size=3D1, re-declare as DEVICE_HOST_ENDIAN. - if just a bit bucket, re-delcare 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/block/fdc.c | 4 ++-- hw/block/onenand.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index ac5d31e8c1..2745586982 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -984,13 +984,13 @@ static void fdctrl_write_mem (void *opaque, hwaddr re= g, static const MemoryRegionOps fdctrl_mem_ops =3D { .read =3D fdctrl_read_mem, .write =3D fdctrl_write_mem, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_HOST_ENDIAN, }; =20 static const MemoryRegionOps fdctrl_mem_strict_ops =3D { .read =3D fdctrl_read_mem, .write =3D fdctrl_write_mem, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_HOST_ENDIAN, .valid =3D { .min_access_size =3D 1, .max_access_size =3D 1, diff --git a/hw/block/onenand.c b/hw/block/onenand.c index fcc5a69b90..95fc0443d3 100644 --- a/hw/block/onenand.c +++ b/hw/block/onenand.c @@ -771,7 +771,7 @@ static void onenand_write(void *opaque, hwaddr addr, static const MemoryRegionOps onenand_ops =3D { .read =3D onenand_read, .write =3D onenand_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void onenand_realize(DeviceState *dev, Error **errp) --=20 2.23.0 From nobody Tue Nov 11 22:32:22 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=1566829514; cv=none; d=zoho.com; s=zohoarc; b=WpM/eKZ11jhHNnK+HFSVQQ93L7+0UAh2FRREt/GXBqKUcDtLCfBo/+gshYQeHr1VaJJ6fmMasFGJUIFZJNTSI8BzdZL4dx1PZM5qyFCkNSLyNGSNr5FnF3MEQU/W77HZcveYAYtT1poi5jMEAhnaPPfn1J68P4FQuomKFF0pjiU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566829514; 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=PkUmzp/V4nBB/QvdUF6WArqQrF3lIUs8kOxoFC9UKsY=; b=mlfhAaUVs2nMcgBmx7+RwrpzqrXPfttyebj+XcaT5hlaulCK3270VbeJDsjHgOj67ZQSCOlq9o+tEqgre3A4BpNosQug3IWglGsxRC0Z28EQ6JYlXEEhPgR1uHIlCgrKOm5bHSP+m9k+waJsrzrpkCpz9XEp58IDcDGkEOtuHxE= 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 1566829514076937.6630087532469; Mon, 26 Aug 2019 07:25:14 -0700 (PDT) Received: from localhost ([::1]:53590 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2Fvh-0000xL-K5 for importer@patchew.org; Mon, 26 Aug 2019 10:25:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42552) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2FpB-00042y-Pk for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:18:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2FpA-00086e-H6 for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:18:25 -0400 Received: from nsstlmta12p.bpe.bigpond.com ([203.38.21.12]:42394) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i2Fp9-00083O-UQ; Mon, 26 Aug 2019 10:18:24 -0400 Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep12p-svc.bpe.nexus.telstra.com.au with ESMTP id <20190826141819.WJDY1023.nsstlfep12p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com>; Tue, 27 Aug 2019 00:18:19 +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 5D2D117510588993; Tue, 27 Aug 2019 00:18:18 +1000 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduvddrudehgedgjeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuffpveftpgfvgffnuffvtfetpdfqfgfvnecuuegrihhlohhuthemucegtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhonhihucfpghhuhigvnhcuoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecukfhppeehkedrudejfedrleekrdeikeenucfrrghrrghmpehhvghlohepuggsiidrthgvlhhsthhrrgdrtghomhdrrghupdhinhgvthepheekrddujeefrdelkedrieekpdhmrghilhhfrhhomhepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqpdhrtghpthhtohepoegrlhhishhtrghirhesrghlihhsthgrihhrvdefrdhmvgeqpdhrtghpthhtohepoegthhhouhhtvggruhesrggurggtohhrvgdrtghomheqpdhrtghpthhtohepoegvughgrghrrdhighhlvghsihgrshesghhmrghilhdrtghomheqpdhrtghpthhtohepoehfrhgvuggvrhhitgdrkhhonhhrrggusegruggrtghorhgvrdgtohhmqedprhgtphhtthhopeeomhgrrhgtrghnughrvgdrlhhurhgvrghusehrvgguhhgrthdrtghomheqpdhrtghpthhtohepoehmihgthhgrvghlseifrghllhgvrdgttgeqpdhrtghpthhtohepoehpsghonhiiihhnihesrhgvughhrghtrdgtohhmqedprhgtphhtthhopeeo phgvthgvrhdrtghhuhgssgesnhhitghtrgdrtghomhdrrghuqedprhgtphhtthhopeeophgvthgvrhdrmhgrhiguvghllheslhhinhgrrhhordhorhhgqedprhgtphhtthhopeeoqhgvmhhuqdgrrhhmsehnohhnghhnuhdrohhrgheqpdhrtghpthhtohepoehqvghmuhdquggvvhgvlhesnhhonhhgnhhurdhorhhgqedprhgtphhtthhopeeothhonhihrdhnghhuhigvnhessghtrdgtohhmqeenucevlhhushhtvghrufhiiigvpedt 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:29 +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] [PATCH 03/19] hw/char: 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 , "Edgar E. Iglesias" , Michael Walle , Fabien Chouteau , KONRAD Frederic , qemu-arm@nongnu.org, Peter Chubb , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini 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/char/cadence_uart.c | 2 +- hw/char/escc.c | 2 +- hw/char/etraxfs_ser.c | 2 +- hw/char/grlib_apbuart.c | 2 +- hw/char/imx_serial.c | 2 +- hw/char/lm32_uart.c | 2 +- hw/char/milkymist-uart.c | 2 +- hw/char/pl011.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/char/cadence_uart.c b/hw/char/cadence_uart.c index 0e315b2376..5a128aa5b3 100644 --- a/hw/char/cadence_uart.c +++ b/hw/char/cadence_uart.c @@ -459,7 +459,7 @@ static uint64_t uart_read(void *opaque, hwaddr offset, static const MemoryRegionOps uart_ops =3D { .read =3D uart_read, .write =3D uart_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void cadence_uart_reset(DeviceState *dev) diff --git a/hw/char/escc.c b/hw/char/escc.c index e185522e27..e2130e04e5 100644 --- a/hw/char/escc.c +++ b/hw/char/escc.c @@ -576,7 +576,7 @@ static uint64_t escc_mem_read(void *opaque, hwaddr addr, static const MemoryRegionOps escc_mem_ops =3D { .read =3D escc_mem_read, .write =3D escc_mem_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, .valid =3D { .min_access_size =3D 1, .max_access_size =3D 1, diff --git a/hw/char/etraxfs_ser.c b/hw/char/etraxfs_ser.c index 15ac12ef22..6096158188 100644 --- a/hw/char/etraxfs_ser.c +++ b/hw/char/etraxfs_ser.c @@ -157,7 +157,7 @@ ser_write(void *opaque, hwaddr addr, static const MemoryRegionOps ser_ops =3D { .read =3D ser_read, .write =3D ser_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .valid =3D { .min_access_size =3D 4, .max_access_size =3D 4 diff --git a/hw/char/grlib_apbuart.c b/hw/char/grlib_apbuart.c index fe3cbf41a3..880878ab4d 100644 --- a/hw/char/grlib_apbuart.c +++ b/hw/char/grlib_apbuart.c @@ -239,7 +239,7 @@ static void grlib_apbuart_write(void *opaque, hwaddr ad= dr, static const MemoryRegionOps grlib_apbuart_ops =3D { .write =3D grlib_apbuart_write, .read =3D grlib_apbuart_read, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, }; =20 static void grlib_apbuart_realize(DeviceState *dev, Error **errp) diff --git a/hw/char/imx_serial.c b/hw/char/imx_serial.c index fddde9b43d..8a2f10d7bd 100644 --- a/hw/char/imx_serial.c +++ b/hw/char/imx_serial.c @@ -334,7 +334,7 @@ static void imx_event(void *opaque, int event) static const struct MemoryRegionOps imx_serial_ops =3D { .read =3D imx_serial_read, .write =3D imx_serial_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void imx_serial_realize(DeviceState *dev, Error **errp) diff --git a/hw/char/lm32_uart.c b/hw/char/lm32_uart.c index 32f29c44cf..372c7d60d8 100644 --- a/hw/char/lm32_uart.c +++ b/hw/char/lm32_uart.c @@ -207,7 +207,7 @@ static void uart_write(void *opaque, hwaddr addr, static const MemoryRegionOps uart_ops =3D { .read =3D uart_read, .write =3D uart_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, .valid =3D { .min_access_size =3D 4, .max_access_size =3D 4, diff --git a/hw/char/milkymist-uart.c b/hw/char/milkymist-uart.c index c358ca07f3..ed4f02c500 100644 --- a/hw/char/milkymist-uart.c +++ b/hw/char/milkymist-uart.c @@ -158,7 +158,7 @@ static const MemoryRegionOps uart_mmio_ops =3D { .min_access_size =3D 4, .max_access_size =3D 4, }, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, }; =20 static void uart_rx(void *opaque, const uint8_t *buf, int size) diff --git a/hw/char/pl011.c b/hw/char/pl011.c index 84ad8ff9fb..0a86f6f340 100644 --- a/hw/char/pl011.c +++ b/hw/char/pl011.c @@ -289,7 +289,7 @@ static void pl011_event(void *opaque, int event) static const MemoryRegionOps pl011_ops =3D { .read =3D pl011_read, .write =3D pl011_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static const VMStateDescription vmstate_pl011 =3D { --=20 2.23.0 From nobody Tue Nov 11 22:32:22 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=1566829546; cv=none; d=zoho.com; s=zohoarc; b=YShk6HvVThzOh/unmcJfDfqcrx3v7fAVVf7pCp+QeNvqknQ4W5gEzgmc/57lerXM007ZfabGsrcyH/CJJMknVcy7Ue5Uv9N/dgZrz2P5BR9rgA4BIhVkqG++cm4kYgpE+bkLdtFuxDz0M8K8ySszyPxqF66qhgCYhAvkopBdZbU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566829546; 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=FhEEUrymiMD/rcuC7XMyK2HHSnxKzRKoQ8vR5PDKOTA=; b=Z6YNh9ub+6zxvo3+g1kG2C6Ng3oDl5TP7FGjGTV/OOsv8A6plgWMt95nFKMgSn6PSyHKUDUzxvdgf8hKD/YstLxSjxGZvAzpcUbxbEmX3mR5HOR874H5ZZJDM9PjlDcI/NesRHQ8RcuJwu8JrPxBPnNhnaKjCrp+QV8VKok3Fyc= 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 1566829546675587.3360049839278; Mon, 26 Aug 2019 07:25:46 -0700 (PDT) Received: from localhost ([::1]:53599 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2FwH-0001Zm-5H for importer@patchew.org; Mon, 26 Aug 2019 10:25:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42549) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2FpB-00042g-Gy for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:18:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2FpA-00086U-E6 for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:18:25 -0400 Received: from nsstlmta14p.bpe.bigpond.com ([203.38.21.14]:37778) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i2Fp9-00083l-Qs for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:18:24 -0400 Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep14p-svc.bpe.nexus.telstra.com.au with ESMTP id <20190826141819.HJYK1555.nsstlfep14p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com>; Tue, 27 Aug 2019 00:18:19 +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 5D2D1175105889D6; Tue, 27 Aug 2019 00:18:19 +1000 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduvddrudehgedgjeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuffpveftpgfvgffnuffvtfetpdfqfgfvnecuuegrihhlohhuthemucegtddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvohhnhicupfhguhihvghnuceothhonhihrdhnghhuhigvnhessghtrdgtohhmqeenucfkphepheekrddujeefrdelkedrieeknecurfgrrhgrmhephhgvlhhopegusgiirdhtvghlshhtrhgrrdgtohhmrdgruhdpihhnvghtpeehkedrudejfedrleekrdeikedpmhgrihhlfhhrohhmpeeothhonhihrdhnghhuhigvnhessghtrdgtohhmqedprhgtphhtthhopeeoqhgvmhhuqdguvghvvghlsehnohhnghhnuhdrohhrgheqpdhrtghpthhtohepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecuvehluhhsthgvrhfuihiivgeptd 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:30 +1000 Message-Id: <5f28bb686a0c4e339bcff2df63492a1aee509c1c.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.14 Subject: [Qemu-devel] [PATCH 04/19] hw/core: 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 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 ununsed, re-declare as DEVICE_HOST_ENDIAN. - if max/min size=3D1, re-declare as DEVICE_HOST_ENDIAN. - if just a bit bucket, re-delcare 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 Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/core/empty_slot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/empty_slot.c b/hw/core/empty_slot.c index 3ba450e1ca..2785b6acf9 100644 --- a/hw/core/empty_slot.c +++ b/hw/core/empty_slot.c @@ -49,7 +49,7 @@ static void empty_slot_write(void *opaque, hwaddr addr, static const MemoryRegionOps empty_slot_ops =3D { .read =3D empty_slot_read, .write =3D empty_slot_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_HOST_ENDIAN, }; =20 void empty_slot_init(hwaddr addr, uint64_t slot_size) --=20 2.23.0 From nobody Tue Nov 11 22:32:22 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 From nobody Tue Nov 11 22:32:22 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=1566829832; cv=none; d=zoho.com; s=zohoarc; b=UyMBCyKcYj2fwvxRKul7BB+lCHgibGfJeqgJi3O8nB8FEdnOZK1Tx7LAxiPPT8rij/gcpeYP/UH4fG62QjjzqYM/8WUJKzh0gBrE6YPRhPyh2bFonycYqbEYASJEzlUNqNHuTsmm+CK4hj5JErI5Rk8U2+WDYGEW00WNRQa7T3Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566829832; 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=zrJ6MPWD4+/88Sz9SgVKis3WxZfairHFP5VG8Ii/Xfc=; b=Gg0wVLl1PTiApvENvFvSFB+EpJLt+wXFePQmPeQralDWobXce0uo5W02CTH66f6Xnq1XOL2jcnVvn9LhOe1eF/PO9pMyVEy6TDDKq8+OQKmt3rIHPZWJ2XYFSzuQaKE+W5P9kFMtLSwIyQR2aK4KEydp2xd+aEv92OrsL1M13E0= 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 1566829832560685.6581594398997; Mon, 26 Aug 2019 07:30:32 -0700 (PDT) Received: from localhost ([::1]:53656 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2G0p-0005IC-F5 for importer@patchew.org; Mon, 26 Aug 2019 10:30:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42620) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2FpY-0004OD-1l for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:18:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2FpW-0008MA-3e for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:18:47 -0400 Received: from nsstlmta35p.bpe.bigpond.com ([203.38.21.35]:50794) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i2FpU-0008HU-R4; Mon, 26 Aug 2019 10:18:45 -0400 Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep35p-svc.bpe.nexus.telstra.com.au with ESMTP id <20190826141839.CMQF29150.nsstlfep35p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com>; Tue, 27 Aug 2019 00:18:39 +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 5D2D117510588E84; Tue, 27 Aug 2019 00:18:38 +1000 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduvddrudehgedgjeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuffpveftpgfvgffnuffvtfetpdfqfgfvnecuuegrihhlohhuthemucegtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhonhihucfpghhuhigvnhcuoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecukfhppeehkedrudejfedrleekrdeikeenucfrrghrrghmpehhvghlohepuggsiidrthgvlhhsthhrrgdrtghomhdrrghupdhinhgvthepheekrddujeefrdelkedrieekpdhmrghilhhfrhhomhepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqpdhrtghpthhtohepoeetnhgurhgvfidruegruhhmrghnnhesmhhitghrohhsohhfthdrtghomheqpdhrtghpthhtohepoegvughgrghrrdhighhlvghsihgrshesghhmrghilhdrtghomheqpdhrtghpthhtohepoehfgegsuhhgsegrmhhsrghtrdhorhhgqedprhgtphhtthhopeeoghigthesmhhprhgtrdhpkhhurdgvughurdgtnheqpdhrtghpthhtohepoehmrghrkhdrtggrvhgvqdgrhihlrghnugesihhlrghnuggvrdgtohdruhhkqedprhgtphhtthhopeeomhhsthesrhgvughhrghtrdgtohhmqedprhgtphhtthhopeeophgsohhniihinhhisehrvgguhhgrthdrtghomheqpdhrtghpthhtohepoehpvghtvghrrdhm rgihuggvlhhlsehlihhnrghrohdrohhrgheqpdhrtghpthhtohepoehqvghmuhdqrghrmhesnhhonhhgnhhurdhorhhgqedprhgtphhtthhopeeoqhgvmhhuqdguvghvvghlsehnohhnghhnuhdrohhrgheqpdhrtghpthhtohepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecuvehluhhsthgvrhfuihiivgeptd 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:32 +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.35 Subject: [Qemu-devel] [PATCH 06/19] hw/dma: 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 S. Tsirkin" , Peter Maydell , Mark Cave-Ayland , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Andrew Baumann , qemu-arm@nongnu.org, Paolo Bonzini , "Edgar E. Iglesias" , Guan Xuetao 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/dma/bcm2835_dma.c | 4 ++-- hw/dma/etraxfs_dma.c | 14 +++++++------- hw/dma/i8257.c | 4 ++-- hw/dma/pl080.c | 2 +- hw/dma/pl330.c | 2 +- hw/dma/puv3_dma.c | 2 +- hw/dma/sparc32_dma.c | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/hw/dma/bcm2835_dma.c b/hw/dma/bcm2835_dma.c index 192bd377a0..550e67f686 100644 --- a/hw/dma/bcm2835_dma.c +++ b/hw/dma/bcm2835_dma.c @@ -290,7 +290,7 @@ static void bcm2835_dma15_write(void *opaque, hwaddr of= fset, uint64_t value, static const MemoryRegionOps bcm2835_dma0_ops =3D { .read =3D bcm2835_dma0_read, .write =3D bcm2835_dma0_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .valid.min_access_size =3D 4, .valid.max_access_size =3D 4, }; @@ -298,7 +298,7 @@ static const MemoryRegionOps bcm2835_dma0_ops =3D { static const MemoryRegionOps bcm2835_dma15_ops =3D { .read =3D bcm2835_dma15_read, .write =3D bcm2835_dma15_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .valid.min_access_size =3D 4, .valid.max_access_size =3D 4, }; diff --git a/hw/dma/etraxfs_dma.c b/hw/dma/etraxfs_dma.c index 47e1c6df12..ee3b92437a 100644 --- a/hw/dma/etraxfs_dma.c +++ b/hw/dma/etraxfs_dma.c @@ -698,13 +698,13 @@ dma_write(void *opaque, hwaddr addr, } =20 static const MemoryRegionOps dma_ops =3D { - .read =3D dma_read, - .write =3D dma_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, - .valid =3D { - .min_access_size =3D 1, - .max_access_size =3D 4 - } + .read =3D dma_read, + .write =3D dma_write, + .endianness =3D DEVICE_LITTLE_ENDIAN, + .valid =3D { + .min_access_size =3D 1, + .max_access_size =3D 4 + } }; =20 static int etraxfs_dmac_run(void *opaque) diff --git a/hw/dma/i8257.c b/hw/dma/i8257.c index 792f617eb4..e68736fa44 100644 --- a/hw/dma/i8257.c +++ b/hw/dma/i8257.c @@ -476,7 +476,7 @@ static int i8257_phony_handler(void *opaque, int nchan,= int dma_pos, static const MemoryRegionOps channel_io_ops =3D { .read =3D i8257_read_chan, .write =3D i8257_write_chan, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_HOST_ENDIAN, .impl =3D { .min_access_size =3D 1, .max_access_size =3D 1, @@ -500,7 +500,7 @@ static const MemoryRegionPortio pageh_portio_list[] =3D= { static const MemoryRegionOps cont_io_ops =3D { .read =3D i8257_read_cont, .write =3D i8257_write_cont, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_HOST_ENDIAN, .impl =3D { .min_access_size =3D 1, .max_access_size =3D 1, diff --git a/hw/dma/pl080.c b/hw/dma/pl080.c index 52ba23f4bf..cbdd1849cd 100644 --- a/hw/dma/pl080.c +++ b/hw/dma/pl080.c @@ -350,7 +350,7 @@ static void pl080_write(void *opaque, hwaddr offset, static const MemoryRegionOps pl080_ops =3D { .read =3D pl080_read, .write =3D pl080_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void pl080_reset(DeviceState *dev) diff --git a/hw/dma/pl330.c b/hw/dma/pl330.c index f2bb2d9ac1..a9216680ef 100644 --- a/hw/dma/pl330.c +++ b/hw/dma/pl330.c @@ -1496,7 +1496,7 @@ static uint64_t pl330_iomem_read(void *opaque, hwaddr= offset, static const MemoryRegionOps pl330_ops =3D { .read =3D pl330_iomem_read, .write =3D pl330_iomem_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .impl =3D { .min_access_size =3D 4, .max_access_size =3D 4, diff --git a/hw/dma/puv3_dma.c b/hw/dma/puv3_dma.c index 5488d388a9..1577056715 100644 --- a/hw/dma/puv3_dma.c +++ b/hw/dma/puv3_dma.c @@ -74,7 +74,7 @@ static const MemoryRegionOps puv3_dma_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 puv3_dma_realize(DeviceState *dev, Error **errp) diff --git a/hw/dma/sparc32_dma.c b/hw/dma/sparc32_dma.c index 0e5bbcdc7f..bf76f2e558 100644 --- a/hw/dma/sparc32_dma.c +++ b/hw/dma/sparc32_dma.c @@ -226,7 +226,7 @@ static void dma_mem_write(void *opaque, hwaddr addr, static const MemoryRegionOps dma_mem_ops =3D { .read =3D dma_mem_read, .write =3D dma_mem_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, .valid =3D { .min_access_size =3D 4, .max_access_size =3D 4, --=20 2.23.0 From nobody Tue Nov 11 22:32:22 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=1566829773; cv=none; d=zoho.com; s=zohoarc; b=e/RYq4xZSG8bcEZMBMDezHy6NsAFize+DTSUiEtNoa9vHUjyvSOUa59ncK9xA929DzqPaiFmRxv4KctbG3PBPRoqkNc+roqaEsWPDaIUFoRao1lPhDgtj5Ii419ELAhg8U5aoPwlRhQdsnefVkbUJqkmN12GRm1YbeQKIzezk0o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566829773; 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=vA7UptjpJLeLSWnnDkWj6yRqsWVVzVrT3uQ/5tlpUWA=; b=WnzOW2uf2ePGnva72eDp/bjtStCW8MOZNplLZLwqu6JPLkKNmbtpVVVnlfO5BWGcH8BnmnWbJD1cxXxNAugzYBYsh94kjulmjEGNESWxS0hRK/Gd8xSYSgqAgmRpgc1WWOeHpuMlitRSx+Xew7wlOLTs/Y7zNmvtbPlO9rq1jcc= 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 1566829773454823.6358383743678; Mon, 26 Aug 2019 07:29:33 -0700 (PDT) Received: from localhost ([::1]:53644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2Fzt-0004jI-Bw for importer@patchew.org; Mon, 26 Aug 2019 10:29:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42633) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2FpZ-0004P3-Qh for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:18:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2FpX-0008NG-NY for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:18:49 -0400 Received: from nsstlmta40p.bpe.bigpond.com ([203.38.21.40]:46336) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i2FpV-0008IQ-2S; Mon, 26 Aug 2019 10:18:46 -0400 Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep40p-svc.bpe.nexus.telstra.com.au with ESMTP id <20190826141840.EPFV32345.nsstlfep40p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com>; Tue, 27 Aug 2019 00:18:40 +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 5D2D117510588EE7; Tue, 27 Aug 2019 00:18:40 +1000 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduvddrudehgedgjeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuffpveftpgfvgffnuffvtfetpdfqfgfvnecuuegrihhlohhuthemucegtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhonhihucfpghhuhigvnhcuoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecukfhppeehkedrudejfedrleekrdeikeenucfrrghrrghmpehhvghlohepuggsiidrthgvlhhsthhrrgdrtghomhdrrghupdhinhgvthepheekrddujeefrdelkedrieekpdhmrghilhhfrhhomhepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqpdhrtghpthhtohepoegsrghlrhhoghhgsehgmhgrihhlrdgtohhmqedprhgtphhtthhopeeoghigthesmhhprhgtrdhpkhhurdgvughurdgtnheqpdhrtghpthhtohepoehpvghtvghrrdhmrgihuggvlhhlsehlihhnrghrohdrohhrgheqpdhrtghpthhtohepoehqvghmuhdqrghrmhesnhhonhhgnhhurdhorhhgqedprhgtphhtthhopeeoqhgvmhhuqdguvghvvghlsehnohhnghhnuhdrohhrgheqpdhrtghpthhtohepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecuvehluhhsthgvrhfuihiivgeptd 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:33 +1000 Message-Id: <70bf44892612398a5ab32bbcd42a7fa022490bf0.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.40 Subject: [Qemu-devel] [PATCH 07/19] hw/gpio: 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 , Guan Xuetao , qemu-arm@nongnu.org, Peter Maydell 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/gpio/pl061.c | 2 +- hw/gpio/puv3_gpio.c | 2 +- hw/gpio/zaurus.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/gpio/pl061.c b/hw/gpio/pl061.c index 2a828260bd..25371d6c5a 100644 --- a/hw/gpio/pl061.c +++ b/hw/gpio/pl061.c @@ -341,7 +341,7 @@ static void pl061_set_irq(void * opaque, int irq, int l= evel) static const MemoryRegionOps pl061_ops =3D { .read =3D pl061_read, .write =3D pl061_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void pl061_luminary_init(Object *obj) diff --git a/hw/gpio/puv3_gpio.c b/hw/gpio/puv3_gpio.c index d19e342514..46ab3b80be 100644 --- a/hw/gpio/puv3_gpio.c +++ b/hw/gpio/puv3_gpio.c @@ -97,7 +97,7 @@ static const MemoryRegionOps puv3_gpio_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 puv3_gpio_realize(DeviceState *dev, Error **errp) diff --git a/hw/gpio/zaurus.c b/hw/gpio/zaurus.c index 9a12c68342..60bbbb8564 100644 --- a/hw/gpio/zaurus.c +++ b/hw/gpio/zaurus.c @@ -157,7 +157,7 @@ static void scoop_write(void *opaque, hwaddr addr, static const MemoryRegionOps scoop_ops =3D { .read =3D scoop_read, .write =3D scoop_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void scoop_gpio_set(void *opaque, int line, int level) --=20 2.23.0 From nobody Tue Nov 11 22:32:22 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=1566829330; cv=none; d=zoho.com; s=zohoarc; b=FGJxI+GUnXUv9Gz3buhCAKq0JQRTRsJIkdPNvHTnfkBQWE2nKL9YTf7ISWZE4KiocBsQq4xV6ZhnE1bPGP5K2tBJf0aHca4xwslR3IzMrtmqajDJI3gezVEtdsG8PsvxzG2xP9PcFUh5agOmxtuDnSObEAjq1UfYjc7BEaZjNj4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566829330; 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=IqwA75fWongG3QDVM7vU2Y0MTPUXEAP3yWiiDoH7Xrk=; b=etILDKdmXqUasFfmEW8tbk7UrwM0eVBUbddqVv+EV0BrkRiFR4k0oaRGT5o997O8v6UEBIHy7nBU5r9PjryfQTvJPDZ5YxsoSe4+SRiMJdgQoTVKS/6vu/vmHfSMGE7FFjqcLYkBiY+o/sk1DDYRQUpJ4lJGjyDqAyZZXguuYZs= 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 1566829330855248.2556046736114; Mon, 26 Aug 2019 07:22:10 -0700 (PDT) Received: from localhost ([::1]:53538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2Fsn-0006Ue-QE for importer@patchew.org; Mon, 26 Aug 2019 10:22:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42653) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2Fpb-0004Qw-C0 for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:18:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2Fpa-0008Ox-0K for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:18:51 -0400 Received: from nsstlmta31p.bpe.bigpond.com ([203.38.21.31]:53343) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i2FpY-0008K4-Uw; Mon, 26 Aug 2019 10:18:49 -0400 Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep31p-svc.bpe.nexus.telstra.com.au with ESMTP id <20190826141842.ITCV30018.nsstlfep31p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com>; Tue, 27 Aug 2019 00:18:42 +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 5D2D117510588F73; Tue, 27 Aug 2019 00:18:42 +1000 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduvddrudehgedgjeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuffpveftpgfvgffnuffvtfetpdfqfgfvnecuuegrihhlohhuthemucegtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhonhihucfpghhuhigvnhcuoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecukfhppeehkedrudejfedrleekrdeikeenucfrrghrrghmpehhvghlohepuggsiidrthgvlhhsthhrrgdrtghomhdrrghupdhinhgvthepheekrddujeefrdelkedrieekpdhmrghilhhfrhhomhepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqpdhrtghpthhtohepoegurghvihgusehgihgsshhonhdrughrohhpsggvrghrrdhiugdrrghuqedprhgtphhtthhopeeoihdrmhhithhshigrnhhkohesghhmrghilhdrtghomheqpdhrtghpthhtohepoehpvghtvghrrdgthhhusggssehnihgtthgrrdgtohhmrdgruheqpdhrtghpthhtohepoehpvghtvghrrdhmrgihuggvlhhlsehlihhnrghrohdrohhrgheqpdhrtghpthhtohepoehqvghmuhdqrghrmhesnhhonhhgnhhurdhorhhgqedprhgtphhtthhopeeoqhgvmhhuqdguvghvvghlsehnohhnghhnuhdrohhrgheqpdhrtghpthhtohepoehqvghmuhdqphhptgesnhhonhhgnhhurdhorhhgqedprhgtphhtthhopeeo thhonhihrdhnghhuhigvnhessghtrdgtohhmqeenucevlhhushhtvghrufhiiigvpedt 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:34 +1000 Message-Id: <8e06140f2ab714c4f9713f2d89287af4cc8ddf12.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.31 Subject: [Qemu-devel] [PATCH 08/19] hw/i2c: 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 , qemu-arm@nongnu.org, Peter Chubb , qemu-ppc@nongnu.org, David Gibson 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 ununsed, re-declare as DEVICE_HOST_ENDIAN. - if max/min size=3D1, re-declare as DEVICE_HOST_ENDIAN. - if just a bit bucket, re-delcare 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 Acked-by: David Gibson --- hw/i2c/exynos4210_i2c.c | 2 +- hw/i2c/imx_i2c.c | 2 +- hw/i2c/mpc_i2c.c | 2 +- hw/i2c/versatile_i2c.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/i2c/exynos4210_i2c.c b/hw/i2c/exynos4210_i2c.c index a600f65560..d7e462664a 100644 --- a/hw/i2c/exynos4210_i2c.c +++ b/hw/i2c/exynos4210_i2c.c @@ -266,7 +266,7 @@ static void exynos4210_i2c_write(void *opaque, hwaddr o= ffset, static const MemoryRegionOps exynos4210_i2c_ops =3D { .read =3D exynos4210_i2c_read, .write =3D exynos4210_i2c_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static const VMStateDescription exynos4210_i2c_vmstate =3D { diff --git a/hw/i2c/imx_i2c.c b/hw/i2c/imx_i2c.c index 30b9aea247..cc2689d967 100644 --- a/hw/i2c/imx_i2c.c +++ b/hw/i2c/imx_i2c.c @@ -278,7 +278,7 @@ static const MemoryRegionOps imx_i2c_ops =3D { .write =3D imx_i2c_write, .valid.min_access_size =3D 1, .valid.max_access_size =3D 2, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static const VMStateDescription imx_i2c_vmstate =3D { diff --git a/hw/i2c/mpc_i2c.c b/hw/i2c/mpc_i2c.c index 0aa1be3ce7..b71b5ff7d5 100644 --- a/hw/i2c/mpc_i2c.c +++ b/hw/i2c/mpc_i2c.c @@ -306,7 +306,7 @@ static const MemoryRegionOps i2c_ops =3D { .read =3D mpc_i2c_read, .write =3D mpc_i2c_write, .valid.max_access_size =3D 1, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, }; =20 static const VMStateDescription mpc_i2c_vmstate =3D { diff --git a/hw/i2c/versatile_i2c.c b/hw/i2c/versatile_i2c.c index 1ac2a6f59a..c92d3b115c 100644 --- a/hw/i2c/versatile_i2c.c +++ b/hw/i2c/versatile_i2c.c @@ -77,7 +77,7 @@ static void versatile_i2c_write(void *opaque, hwaddr offs= et, static const MemoryRegionOps versatile_i2c_ops =3D { .read =3D versatile_i2c_read, .write =3D versatile_i2c_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void versatile_i2c_init(Object *obj) --=20 2.23.0 From nobody Tue Nov 11 22:32:22 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=1566830224; cv=none; d=zoho.com; s=zohoarc; b=UHJ7YG/0lYFI8MgD3GjD0Hae4Z0+Vznf47CUN4Km6IlDUcuo8DYvYzRXY3xY6S9I9xsLSDzuya5aCDg9fotehYA8vBpxWJPKlYuRPLi30CyWARKF0lkFLs/kPmnH3b34ukVpx011sTWTQi8J1UB+LuZzB/yxw0n2V5BcS9BmZCU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566830224; 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=reHtVeSwApHYyI+WU+yS7YrPYUH30WcGB+MT+R1CEls=; b=TwHYjIGhivUzu5EyzlV9lXT8iD0wGKmyRxsKq9by07d6ajITTbYUM64MXj3O5K+x3AOwDWdKxPrIoGZWVKLCnDBBOTKWX8ZPdOUtf6z1eUtxXDovDl5MOF8+mhDbAORgAf8jFkcrI5lo9A22+C8IWiCjwLzAfC+rxXwV2BlGSZQ= 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 1566830224319674.5520298394066; Mon, 26 Aug 2019 07:37:04 -0700 (PDT) Received: from localhost ([::1]:53730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2G79-0001zU-Ra for importer@patchew.org; Mon, 26 Aug 2019 10:36:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42670) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2Fpc-0004Rx-Fr for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:18:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2Fpb-0008QU-6r for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:18:52 -0400 Received: from nsstlmta26p.bpe.bigpond.com ([203.38.21.26]:48695) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i2Fpa-0008Kg-JE; Mon, 26 Aug 2019 10:18:51 -0400 Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep26p-svc.bpe.nexus.telstra.com.au with ESMTP id <20190826141843.PLVP7601.nsstlfep26p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com>; Tue, 27 Aug 2019 00:18:43 +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 5D2D117510588FB3; Tue, 27 Aug 2019 00:18:43 +1000 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduvddrudehgedgjeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuffpveftpgfvgffnuffvtfetpdfqfgfvnecuuegrihhlohhuthemucegtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhonhihucfpghhuhigvnhcuoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecukfhppeehkedrudejfedrleekrdeikeenucfrrghrrghmpehhvghlohepuggsiidrthgvlhhsthhrrgdrtghomhdrrghupdhinhgvthepheekrddujeefrdelkedrieekpdhmrghilhhfrhhomhepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqpdhrtghpthhtohepoehpvghtvghrrdhmrgihuggvlhhlsehlihhnrghrohdrohhrgheqpdhrtghpthhtohepoehqvghmuhdqrghrmhesnhhonhhgnhhurdhorhhgqedprhgtphhtthhopeeoqhgvmhhuqdguvghvvghlsehnohhnghhnuhdrohhrgheqpdhrtghpthhtohepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecuvehluhhsthgvrhfuihiivgeptd 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:35 +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.26 Subject: [Qemu-devel] [PATCH 09/19] hw/input: 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 , qemu-arm@nongnu.org, Peter Maydell 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/input/pl050.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/input/pl050.c b/hw/input/pl050.c index 1123037b38..873f44abad 100644 --- a/hw/input/pl050.c +++ b/hw/input/pl050.c @@ -139,7 +139,7 @@ static void pl050_write(void *opaque, hwaddr offset, static const MemoryRegionOps pl050_ops =3D { .read =3D pl050_read, .write =3D pl050_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void pl050_realize(DeviceState *dev, Error **errp) --=20 2.23.0 From nobody Tue Nov 11 22:32:22 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=1566830268; cv=none; d=zoho.com; s=zohoarc; b=SCVZt7h3lWhNykrs8zf9hxApIuHr1WqddYZsvduUJat1rT7mZVdJeBCTKmL16F85u2dN+FVQ4z0OGsgimsv7lF/MWCoFfzwKlhN1ZZ6v4GxdIdDwA0avuJG/VI85G1VAbCjiiQC2KXbUvz4TLe4k9RG6KSUhe637pB5L9k4N17w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566830268; 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=dYDFpDtzRFfAO9EOOiVDcYUEyfTzZGEBm8+iEpK3MfY=; b=nxtNGmeNdLA5nMfsPLw57j3aotXHAp8Dr59sUcAh7siJUGGC3WACK3LSRqhnqct4gFTPG1vHv1Xle+Mfvrgu/iAWZxxqH+ZMeNlAjZ0flSZJeir2AH42QduUcPw7blIrramNIZVEB7HrfzKL1OF0npSmIyXI0iRvfYw2d/KWgMQ= 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 1566830268097836.2975038612223; Mon, 26 Aug 2019 07:37:48 -0700 (PDT) Received: from localhost ([::1]:53740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2G7k-0002Sh-Rd for importer@patchew.org; Mon, 26 Aug 2019 10:37:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42768) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2Fpo-0004X0-BP for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:19:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2Fpm-0000Ju-QU for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:19:04 -0400 Received: from nsstlmta18p.bpe.bigpond.com ([203.38.21.18]:34232) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i2Fpl-00008j-T3; Mon, 26 Aug 2019 10:19:02 -0400 Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep18p-svc.bpe.nexus.telstra.com.au with ESMTP id <20190826141857.DCXX10803.nsstlfep18p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com>; Tue, 27 Aug 2019 00:18:57 +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 5D3581440DDB0FB8; Tue, 27 Aug 2019 00:18:56 +1000 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduvddrudehgedgjeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuffpveftpgfvgffnuffvtfetpdfqfgfvnecuuegrihhlohhuthemucegtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhonhihucfpghhuhigvnhcuoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecukfhppeehkedrudejfedrleekrdeikeenucfrrghrrghmpehhvghlohepuggsiidrthgvlhhsthhrrgdrtghomhdrrghupdhinhgvthepheekrddujeefrdelkedrieekpdhmrghilhhfrhhomhepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqpdhrtghpthhtohepoegvughgrghrrdhighhlvghsihgrshesghhmrghilhdrtghomheqpdhrtghpthhtohepoehggihtsehmphhrtgdrphhkuhdrvgguuhdrtghnqedprhgtphhtthhopeeomhgrrhhkrdgtrghvvgdqrgihlhgrnhgusehilhgrnhguvgdrtghordhukheqpdhrtghpthhtohepoehpvghtvghrrdgthhhusggssehnihgtthgrrdgtohhmrdgruheqpdhrtghpthhtohepoehpvghtvghrrdhmrgihuggvlhhlsehlihhnrghrohdrohhrgheqpdhrtghpthhtohepoehqvghmuhdqrghrmhesnhhonhhgnhhurdhorhhgqedprhgtphhtthhopeeoqhgvmhhuqdguvghvvghlsehnohhnghhnuhdrohhrgheqpdhrtghp thhtohepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecuvehluhhsthgvrhfuihiivgeptd 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:36 +1000 Message-Id: <554a2f98479cd6dbf0d0a1c019fe728b0902d0de.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.18 Subject: [Qemu-devel] [PATCH 10/19] hw/intc: 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 , Mark Cave-Ayland , qemu-arm@nongnu.org, Peter Chubb , "Edgar E. Iglesias" , Guan Xuetao 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/intc/arm_gic.c | 12 ++++++------ hw/intc/arm_gicv3.c | 4 ++-- hw/intc/arm_gicv3_its_common.c | 2 +- hw/intc/etraxfs_pic.c | 2 +- hw/intc/imx_avic.c | 2 +- hw/intc/imx_gpcv2.c | 2 +- hw/intc/pl190.c | 2 +- hw/intc/puv3_intc.c | 2 +- hw/intc/slavio_intctl.c | 4 ++-- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c index 1d7da7baa2..009933952c 100644 --- a/hw/intc/arm_gic.c +++ b/hw/intc/arm_gic.c @@ -2000,38 +2000,38 @@ static const MemoryRegionOps gic_ops[2] =3D { { .read_with_attrs =3D gic_dist_read, .write_with_attrs =3D gic_dist_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }, { .read_with_attrs =3D gic_thiscpu_read, .write_with_attrs =3D gic_thiscpu_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, } }; =20 static const MemoryRegionOps gic_cpu_ops =3D { .read_with_attrs =3D gic_do_cpu_read, .write_with_attrs =3D gic_do_cpu_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static const MemoryRegionOps gic_virt_ops[2] =3D { { .read_with_attrs =3D gic_thiscpu_hyp_read, .write_with_attrs =3D gic_thiscpu_hyp_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }, { .read_with_attrs =3D gic_thisvcpu_read, .write_with_attrs =3D gic_thisvcpu_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, } }; =20 static const MemoryRegionOps gic_viface_ops =3D { .read_with_attrs =3D gic_do_hyp_read, .write_with_attrs =3D gic_do_hyp_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void arm_gic_realize(DeviceState *dev, Error **errp) diff --git a/hw/intc/arm_gicv3.c b/hw/intc/arm_gicv3.c index 66eaa97198..9b4d5bad69 100644 --- a/hw/intc/arm_gicv3.c +++ b/hw/intc/arm_gicv3.c @@ -352,12 +352,12 @@ static const MemoryRegionOps gic_ops[] =3D { { .read_with_attrs =3D gicv3_dist_read, .write_with_attrs =3D gicv3_dist_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }, { .read_with_attrs =3D gicv3_redist_read, .write_with_attrs =3D gicv3_redist_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, } }; =20 diff --git a/hw/intc/arm_gicv3_its_common.c b/hw/intc/arm_gicv3_its_common.c index 66c4c6a188..97ff537bf1 100644 --- a/hw/intc/arm_gicv3_its_common.c +++ b/hw/intc/arm_gicv3_its_common.c @@ -96,7 +96,7 @@ static MemTxResult gicv3_its_trans_write(void *opaque, hw= addr offset, static const MemoryRegionOps gicv3_its_trans_ops =3D { .read_with_attrs =3D gicv3_its_trans_read, .write_with_attrs =3D gicv3_its_trans_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 void gicv3_its_init_mmio(GICv3ITSState *s, const MemoryRegionOps *ops) diff --git a/hw/intc/etraxfs_pic.c b/hw/intc/etraxfs_pic.c index 77f652acec..5895b671b1 100644 --- a/hw/intc/etraxfs_pic.c +++ b/hw/intc/etraxfs_pic.c @@ -112,7 +112,7 @@ static void pic_write(void *opaque, hwaddr addr, static const MemoryRegionOps pic_ops =3D { .read =3D pic_read, .write =3D pic_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .valid =3D { .min_access_size =3D 4, .max_access_size =3D 4 diff --git a/hw/intc/imx_avic.c b/hw/intc/imx_avic.c index 63fc602a1a..15ed512e86 100644 --- a/hw/intc/imx_avic.c +++ b/hw/intc/imx_avic.c @@ -310,7 +310,7 @@ static void imx_avic_write(void *opaque, hwaddr offset, static const MemoryRegionOps imx_avic_ops =3D { .read =3D imx_avic_read, .write =3D imx_avic_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void imx_avic_reset(DeviceState *dev) diff --git a/hw/intc/imx_gpcv2.c b/hw/intc/imx_gpcv2.c index 17007a4078..3df4a443b8 100644 --- a/hw/intc/imx_gpcv2.c +++ b/hw/intc/imx_gpcv2.c @@ -65,7 +65,7 @@ static void imx_gpcv2_write(void *opaque, hwaddr offset, static const struct MemoryRegionOps imx_gpcv2_ops =3D { .read =3D imx_gpcv2_read, .write =3D imx_gpcv2_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .impl =3D { /* * Our device would not work correctly if the guest was doing diff --git a/hw/intc/pl190.c b/hw/intc/pl190.c index e3bd3dd121..1b474d25b9 100644 --- a/hw/intc/pl190.c +++ b/hw/intc/pl190.c @@ -222,7 +222,7 @@ static void pl190_write(void *opaque, hwaddr offset, static const MemoryRegionOps pl190_ops =3D { .read =3D pl190_read, .write =3D pl190_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void pl190_reset(DeviceState *d) diff --git a/hw/intc/puv3_intc.c b/hw/intc/puv3_intc.c index e018955ce8..1c8ddbd70d 100644 --- a/hw/intc/puv3_intc.c +++ b/hw/intc/puv3_intc.c @@ -101,7 +101,7 @@ static const MemoryRegionOps puv3_intc_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 puv3_intc_realize(DeviceState *dev, Error **errp) diff --git a/hw/intc/slavio_intctl.c b/hw/intc/slavio_intctl.c index c4cf9096eb..d12e10374c 100644 --- a/hw/intc/slavio_intctl.c +++ b/hw/intc/slavio_intctl.c @@ -136,7 +136,7 @@ static void slavio_intctl_mem_writel(void *opaque, hwad= dr addr, static const MemoryRegionOps slavio_intctl_mem_ops =3D { .read =3D slavio_intctl_mem_readl, .write =3D slavio_intctl_mem_writel, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, .valid =3D { .min_access_size =3D 4, .max_access_size =3D 4, @@ -206,7 +206,7 @@ static void slavio_intctlm_mem_writel(void *opaque, hwa= ddr addr, static const MemoryRegionOps slavio_intctlm_mem_ops =3D { .read =3D slavio_intctlm_mem_readl, .write =3D slavio_intctlm_mem_writel, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, .valid =3D { .min_access_size =3D 4, .max_access_size =3D 4, --=20 2.23.0 From nobody Tue Nov 11 22:32:22 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=1566829951; cv=none; d=zoho.com; s=zohoarc; b=CMvmLqkMr6zNlOZekf6XfQRsi34gG9olYTI7GUUOSeMPRh8WbP3ehxa+/pftQweLjlHg9Mo5tNKTvoDfSMQ6/M4oaPsDNOWjufeYjEUgOHCUBLhrR06rhNCjVPKt9/8ej3si5x2m3AJ54BMtQxSqa+tEDFqbCkN9i4perjcjFfs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566829951; 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=MerwNGFMClhXePZVF9vE1xFUERe5QZNHgUajIjofETs=; b=m1H+JQYYxeJ0kopcw6OCStUhKD6aVM/kfcYUQo8+RH76YYPStt8iHbmJ2oLx+iCAylIKTQSMO2nGfYVo9O5PMTsB8tadpPOIzxiaVltDJIMxkO3lg30sM2A1r/0ZL7xdQDCQbDN4JIzLRL3ZWo9QNcNNp9uWR/Vb3j0P7EC89Fg= 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 1566829951066271.8587632267254; Mon, 26 Aug 2019 07:32:31 -0700 (PDT) Received: from localhost ([::1]:53668 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2G2l-0006iH-GP for importer@patchew.org; Mon, 26 Aug 2019 10:32:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42795) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2Fpt-0004Yh-QN for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:19:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2Fpr-0000Pl-AO for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:19:09 -0400 Received: from nsstlmta14p.bpe.bigpond.com ([203.38.21.14]:36512) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i2Fpo-0000J3-NC for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:19:07 -0400 Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep14p-svc.bpe.nexus.telstra.com.au with ESMTP id <20190826141901.HKEE1555.nsstlfep14p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com>; Tue, 27 Aug 2019 00:19:01 +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 5D3581440DDB10B5; Tue, 27 Aug 2019 00:19:00 +1000 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduvddrudehgedgjeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuffpveftpgfvgffnuffvtfetpdfqfgfvnecuuegrihhlohhuthemucegtddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvohhnhicupfhguhihvghnuceothhonhihrdhnghhuhigvnhessghtrdgtohhmqeenucfkphepheekrddujeefrdelkedrieeknecurfgrrhgrmhephhgvlhhopegusgiirdhtvghlshhtrhgrrdgtohhmrdgruhdpihhnvghtpeehkedrudejfedrleekrdeikedpmhgrihhlfhhrohhmpeeothhonhihrdhnghhuhigvnhessghtrdgtohhmqedprhgtphhtthhopeeosggvrhhtohesihhgrghlihgrrdgtohhmqedprhgtphhtthhopeeoqhgvmhhuqdguvghvvghlsehnohhnghhnuhdrohhrgheqpdhrtghpthhtohepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecuvehluhhsthgvrhfuihiivgeptd 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:37 +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.14 Subject: [Qemu-devel] [PATCH 11/19] hw/ipack: 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 , Alberto Garcia 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 ununsed, re-declare as DEVICE_HOST_ENDIAN. - if max/min size=3D1, re-declare as DEVICE_HOST_ENDIAN. - if just a bit bucket, re-delcare 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 Acked-by: Alberto Garcia --- hw/ipack/tpci200.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ipack/tpci200.c b/hw/ipack/tpci200.c index f931d4df62..c90fabab7c 100644 --- a/hw/ipack/tpci200.c +++ b/hw/ipack/tpci200.c @@ -526,7 +526,7 @@ static void tpci200_write_las3(void *opaque, hwaddr add= r, uint64_t val, static const MemoryRegionOps tpci200_cfg_ops =3D { .read =3D tpci200_read_cfg, .write =3D tpci200_write_cfg, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .valid =3D { .min_access_size =3D 1, .max_access_size =3D 4 @@ -540,7 +540,7 @@ static const MemoryRegionOps tpci200_cfg_ops =3D { static const MemoryRegionOps tpci200_las0_ops =3D { .read =3D tpci200_read_las0, .write =3D tpci200_write_las0, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .valid =3D { .min_access_size =3D 2, .max_access_size =3D 2 @@ -550,7 +550,7 @@ static const MemoryRegionOps tpci200_las0_ops =3D { static const MemoryRegionOps tpci200_las1_ops =3D { .read =3D tpci200_read_las1, .write =3D tpci200_write_las1, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .valid =3D { .min_access_size =3D 1, .max_access_size =3D 2 @@ -560,7 +560,7 @@ static const MemoryRegionOps tpci200_las1_ops =3D { static const MemoryRegionOps tpci200_las2_ops =3D { .read =3D tpci200_read_las2, .write =3D tpci200_write_las2, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .valid =3D { .min_access_size =3D 1, .max_access_size =3D 2 @@ -570,7 +570,7 @@ static const MemoryRegionOps tpci200_las2_ops =3D { static const MemoryRegionOps tpci200_las3_ops =3D { .read =3D tpci200_read_las3, .write =3D tpci200_write_las3, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .valid =3D { .min_access_size =3D 1, .max_access_size =3D 1 --=20 2.23.0 From nobody Tue Nov 11 22:32:22 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=1566829585; cv=none; d=zoho.com; s=zohoarc; b=fSVetWOdWw+WEJFT9rqHypW1eZ/woFeMfYXpScB3TF4ekr+YgadUMjtrWsZdWjE3ObgK32mm3r+ad4m1cRnnbNS1IcYSwv4R1BeR47kfDGNVPpfnZs4EDsBNXXkNI3jUcDlocjOdcjUCq3+mTb6JcP6gNmCcZILfkBYHcNvVbuQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566829585; 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=NwfO+e1k38fuStBZuPvB2cuEqwFgCvpXlhreqjTakXQ=; b=STwtvy5ToiHh3WFZwiIJ4YNYCzDx0BwCXiNapA/h6KnEosf6SoSbwdJwM9VEt0lIT42vVZmqMB+EmhpzuZ8tyrs9MAmaEPGmbbz+HPuBtnc4ahZLyAZU0nlFGBZmngwAEqoH8hRPiasdZ+Csnz4j9IIVz8DyoSfQC1YsAzqHExk= 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 1566829585620189.30536360533972; Mon, 26 Aug 2019 07:26:25 -0700 (PDT) Received: from localhost ([::1]:53600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2Fwu-0001i8-5B for importer@patchew.org; Mon, 26 Aug 2019 10:26:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42817) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2Fpx-0004aG-DQ for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:19:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2Fpt-0000TU-O0 for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:19:11 -0400 Received: from nsstlmta19p.bpe.bigpond.com ([203.38.21.19]:47262) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i2Fpr-0000KH-Nf for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:19:09 -0400 Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep19p-svc.bpe.nexus.telstra.com.au with ESMTP id <20190826141902.LWAR20367.nsstlfep19p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com>; Tue, 27 Aug 2019 00:19:02 +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 5D3581440DDB1122; Tue, 27 Aug 2019 00:19:02 +1000 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduvddrudehgedgjeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuffpveftpgfvgffnuffvtfetpdfqfgfvnecuuegrihhlohhuthemucegtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhonhihucfpghhuhigvnhcuoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecukfhppeehkedrudejfedrleekrdeikeenucfrrghrrghmpehhvghlohepuggsiidrthgvlhhsthhrrgdrtghomhdrrghupdhinhgvthepheekrddujeefrdelkedrieekpdhmrghilhhfrhhomhepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqpdhrtghpthhtohepoegrmhgrrhhkohhvihgtseifrghvvggtohhmphdrtghomheqpdhrtghpthhtohepoegrrhhikhgrlhhoseifrghvvggtohhmphdrtghomheqpdhrtghpthhtohepoehqvghmuhdquggvvhgvlhesnhhonhhgnhhurdhorhhgqedprhgtphhtthhopeeothhonhihrdhnghhuhigvnhessghtrdgtohhmqeenucevlhhushhtvghrufhiiigvpedv 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:38 +1000 Message-Id: <27e2352289217228aa255eaeb997ed1fded48c01.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.19 Subject: [Qemu-devel] [PATCH 12/19] hw/isa: 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: Aleksandar Rikalo , Tony Nguyen , Aleksandar Markovic 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/isa/vt82c686.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 50bd28fa82..400f2b3c87 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -109,7 +109,7 @@ static uint64_t superio_ioport_readb(void *opaque, hwad= dr addr, unsigned size) static const MemoryRegionOps superio_ops =3D { .read =3D superio_ioport_readb, .write =3D superio_ioport_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 From nobody Tue Nov 11 22:32:22 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=1566830446; cv=none; d=zoho.com; s=zohoarc; b=Wl9DM8wOI1HpCGeFhwZmWDXq/zU++iKdfM6FPiq3Mm9D1aupbmCXiHpAx1Xfp+CP0fVkOALlUTlpIir/BAnbV6kih454GjJ6zEsqejV5/pOAQxq+sL6blmIDpGbPRvr0Aygk6+F59WVwc6go1TP2h3gAlwz4/VItgldFBtShE1o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566830446; 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=rPVZ5MeIxTfJh+Uc05pxrh83igNcai2WjfgKqzj/MfA=; b=Urq6BtN7HfDHSBaGhn15Ynk0DvZj1kyyCPWM0fDvdTYlpV1a3T6lXRL0wIZtt0LoFKeA0crNpwciC3/aVLnCC8+uaDq445748XNPC7ICojcLZ0JfVP0/m7M7QfgDQwJ4DeHuxNsk8DybiMMtIYODbLjF5f4XWahZeTqoNWG5F/8= 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 1566830446324748.3531859661911; Mon, 26 Aug 2019 07:40:46 -0700 (PDT) Received: from localhost ([::1]:53866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2GAm-0005Ok-Vl for importer@patchew.org; Mon, 26 Aug 2019 10:40:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42846) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2Fq3-0004bH-Av for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:19:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2Fq1-0000fW-El for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:19:19 -0400 Received: from nsstlmta28p.bpe.bigpond.com ([203.38.21.28]:44188) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i2Fpx-0000OX-Mv; Mon, 26 Aug 2019 10:19:15 -0400 Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep28p-svc.bpe.nexus.telstra.com.au with ESMTP id <20190826141905.LAPZ9614.nsstlfep28p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com>; Tue, 27 Aug 2019 00:19:05 +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 5D3581440DDB1246; Tue, 27 Aug 2019 00:19:05 +1000 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduvddrudehgedgjeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuffpveftpgfvgffnuffvtfetpdfqfgfvnecuuegrihhlohhuthemucegtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhonhihucfpghhuhigvnhcuoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecukfhppeehkedrudejfedrleekrdeikeenucfrrghrrghmpehhvghlohepuggsiidrthgvlhhsthhrrgdrtghomhdrrghupdhinhgvthepheekrddujeefrdelkedrieekpdhmrghilhhfrhhomhepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqpdhrtghpthhtohepoegurghvihgusehgihgsshhonhdrughrohhpsggvrghrrdhiugdrrghuqedprhgtphhtthhopeeofhegsghughesrghmshgrthdrohhrgheqpdhrtghpthhtohepoehggihtsehmphhrtgdrphhkuhdrvgguuhdrtghnqedprhgtphhtthhopeeojhhslhgrsgihsehsuhhsvgdrtgiiqedprhgtphhtthhopeeomhgrrhhkrdgtrghvvgdqrgihlhgrnhgusehilhgrnhguvgdrtghordhukheqpdhrtghpthhtohepoehpvghtvghrrdhmrgihuggvlhhlsehlihhnrghrohdrohhrgheqpdhrtghpthhtohepoehqvghmuhdqrghrmhesnhhonhhgnhhurdhorhhgqedprhgtphhtthhopeeoqhgvmhhuqdguvghv vghlsehnohhnghhnuhdrohhrgheqpdhrtghpthhtohepoehqvghmuhdqphhptgesnhhonhhgnhhurdhorhhgqedprhgtphhtthhopeeothhonhihrdhnghhuhigvnhessghtrdgtohhmqeenucevlhhushhtvghrufhiiigvpedv 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:39 +1000 Message-Id: <98939505e0aede2a4c907301b21d1f348e29b9d2.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.28 Subject: [Qemu-devel] [PATCH 13/19] hw/misc: 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 , Mark Cave-Ayland , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Guan Xuetao , Jiri Slaby , David Gibson 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/misc/a9scu.c | 2 +- hw/misc/applesmc.c | 6 +++--- hw/misc/arm11scu.c | 2 +- hw/misc/arm_integrator_debug.c | 2 +- hw/misc/arm_l2x0.c | 2 +- hw/misc/edu.c | 2 +- hw/misc/mos6522.c | 2 +- hw/misc/puv3_pm.c | 2 +- hw/misc/unimp.c | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/misc/a9scu.c b/hw/misc/a9scu.c index 45c91db303..59335ca72f 100644 --- a/hw/misc/a9scu.c +++ b/hw/misc/a9scu.c @@ -96,7 +96,7 @@ static void a9_scu_write(void *opaque, hwaddr offset, static const MemoryRegionOps a9_scu_ops =3D { .read =3D a9_scu_read, .write =3D a9_scu_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void a9_scu_reset(DeviceState *dev) diff --git a/hw/misc/applesmc.c b/hw/misc/applesmc.c index 24d57e8677..cd60f458de 100644 --- a/hw/misc/applesmc.c +++ b/hw/misc/applesmc.c @@ -285,7 +285,7 @@ static void qdev_applesmc_isa_reset(DeviceState *dev) static const MemoryRegionOps applesmc_data_io_ops =3D { .write =3D applesmc_io_data_write, .read =3D applesmc_io_data_read, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_HOST_ENDIAN, .impl =3D { .min_access_size =3D 1, .max_access_size =3D 1, @@ -295,7 +295,7 @@ static const MemoryRegionOps applesmc_data_io_ops =3D { static const MemoryRegionOps applesmc_cmd_io_ops =3D { .write =3D applesmc_io_cmd_write, .read =3D applesmc_io_cmd_read, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_HOST_ENDIAN, .impl =3D { .min_access_size =3D 1, .max_access_size =3D 1, @@ -305,7 +305,7 @@ static const MemoryRegionOps applesmc_cmd_io_ops =3D { static const MemoryRegionOps applesmc_err_io_ops =3D { .write =3D applesmc_io_err_write, .read =3D applesmc_io_err_read, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_HOST_ENDIAN, .impl =3D { .min_access_size =3D 1, .max_access_size =3D 1, diff --git a/hw/misc/arm11scu.c b/hw/misc/arm11scu.c index 3023284d6f..dd690dc985 100644 --- a/hw/misc/arm11scu.c +++ b/hw/misc/arm11scu.c @@ -58,7 +58,7 @@ static void mpcore_scu_write(void *opaque, hwaddr offset, static const MemoryRegionOps mpcore_scu_ops =3D { .read =3D mpcore_scu_read, .write =3D mpcore_scu_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void arm11_scu_realize(DeviceState *dev, Error **errp) diff --git a/hw/misc/arm_integrator_debug.c b/hw/misc/arm_integrator_debug.c index 3e23201ae6..c392067332 100644 --- a/hw/misc/arm_integrator_debug.c +++ b/hw/misc/arm_integrator_debug.c @@ -72,7 +72,7 @@ static void intdbg_control_write(void *opaque, hwaddr off= set, static const MemoryRegionOps intdbg_control_ops =3D { .read =3D intdbg_control_read, .write =3D intdbg_control_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void intdbg_control_init(Object *obj) diff --git a/hw/misc/arm_l2x0.c b/hw/misc/arm_l2x0.c index af2c7af4a0..cd1747b7a1 100644 --- a/hw/misc/arm_l2x0.c +++ b/hw/misc/arm_l2x0.c @@ -159,7 +159,7 @@ static void l2x0_priv_reset(DeviceState *dev) static const MemoryRegionOps l2x0_mem_ops =3D { .read =3D l2x0_priv_read, .write =3D l2x0_priv_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void l2x0_priv_init(Object *obj) diff --git a/hw/misc/edu.c b/hw/misc/edu.c index d5e2bdbb57..c014ea2443 100644 --- a/hw/misc/edu.c +++ b/hw/misc/edu.c @@ -295,7 +295,7 @@ static void edu_mmio_write(void *opaque, hwaddr addr, u= int64_t val, static const MemoryRegionOps edu_mmio_ops =3D { .read =3D edu_mmio_read, .write =3D edu_mmio_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .valid =3D { .min_access_size =3D 4, .max_access_size =3D 8, diff --git a/hw/misc/mos6522.c b/hw/misc/mos6522.c index 57f13db266..7831fa60f9 100644 --- a/hw/misc/mos6522.c +++ b/hw/misc/mos6522.c @@ -365,7 +365,7 @@ void mos6522_write(void *opaque, hwaddr addr, uint64_t = val, unsigned size) static const MemoryRegionOps mos6522_ops =3D { .read =3D mos6522_read, .write =3D mos6522_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_HOST_ENDIAN, .valid =3D { .min_access_size =3D 1, .max_access_size =3D 1, diff --git a/hw/misc/puv3_pm.c b/hw/misc/puv3_pm.c index c213500d9c..b04950ecb9 100644 --- a/hw/misc/puv3_pm.c +++ b/hw/misc/puv3_pm.c @@ -117,7 +117,7 @@ static const MemoryRegionOps puv3_pm_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 puv3_pm_realize(DeviceState *dev, Error **errp) diff --git a/hw/misc/unimp.c b/hw/misc/unimp.c index 0e1cb24629..4aca34ff45 100644 --- a/hw/misc/unimp.c +++ b/hw/misc/unimp.c @@ -46,7 +46,7 @@ static const MemoryRegionOps unimp_ops =3D { .impl.max_access_size =3D 8, .valid.min_access_size =3D 1, .valid.max_access_size =3D 8, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_HOST_ENDIAN, }; =20 static void unimp_realize(DeviceState *dev, Error **errp) --=20 2.23.0 From nobody Tue Nov 11 22:32:22 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=1566830547; cv=none; d=zoho.com; s=zohoarc; b=dpxn9fmjZ4eIWda5pRjs27wsVaj5Z7/UBKhPbYHFDMtkWuQp7dxJMdIUJcoW8fFGUbW1GVb6TyBn5e8pnTFpW7TRJFR4yiD/8u0U8rblmQph66WtKKB2nyqfINeDG2abmd2hEYCNqRklLHmVxANxMn1hTVPAI5C7PAj+kq5ybb8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566830547; 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=cfQJeIOIBOgSAkMg0KG1Um3QEVRdipF/3hs04jF+2Qg=; b=AXmZxg1r7iGKRowTb3pKvDgI8Rg9dhxclNg6g7zVMyXWNCJyXz7Nr4zE232DAqAvtWx+0UgOufhVCiIvSoQnejlPp8rZ+xYmWcPqAbYetVlmO7y0/Ska4qI0rkb2qMMlsbzHg6fsMIdiVNsHepgCYsMdG6K5drSHZkl4z7a+x3o= 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 1566830546875889.9899730152877; Mon, 26 Aug 2019 07:42:26 -0700 (PDT) Received: from localhost ([::1]:53896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2GCM-0006up-5U for importer@patchew.org; Mon, 26 Aug 2019 10:42:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46408) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2G3R-0008Hm-Ki for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:33:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2G3P-0001Vh-AV for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:33:09 -0400 Received: from nsstlmta09p.bpe.bigpond.com ([203.38.21.9]:53381) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i2G3N-0001PS-Gj; Mon, 26 Aug 2019 10:33:07 -0400 Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep21p-svc.bpe.nexus.telstra.com.au with ESMTP id <20190826141907.VWVI15045.nsstlfep21p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com>; Tue, 27 Aug 2019 00:19:07 +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 5D3581440DDB12BF; Tue, 27 Aug 2019 00:19:06 +1000 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduvddrudehgedgjeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuffpveftpgfvgffnuffvtfetpdfqfgfvnecuuegrihhlohhuthemucegtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhonhihucfpghhuhigvnhcuoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecukfhppeehkedrudejfedrleekrdeikeenucfrrghrrghmpehhvghlohepuggsiidrthgvlhhsthhrrgdrtghomhdrrghupdhinhgvthepheekrddujeefrdelkedrieekpdhmrghilhhfrhhomhepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqpdhrtghpthhtohepoegsrdhgrghlvhgrnhhisehgmhgrihhlrdgtohhmqedprhgtphhtthhopeeojhgrshhofigrnhhgsehrvgguhhgrthdrtghomheqpdhrtghpthhtohepoehpvghtvghrrdgthhhusggssehnihgtthgrrdgtohhmrdgruheqpdhrtghpthhtohepoehpvghtvghrrdhmrgihuggvlhhlsehlihhnrghrohdrohhrgheqpdhrtghpthhtohepoehqvghmuhdqrghrmhesnhhonhhgnhhurdhorhhgqedprhgtphhtthhopeeoqhgvmhhuqdguvghvvghlsehnohhnghhnuhdrohhrgheqpdhrtghpthhtohepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecuvehluhhsthgvrhfuihiivgepvd 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:40 +1000 Message-Id: <452af9f741f5fdb467ad5da2c97d1e010a6d3987.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.9 Subject: [Qemu-devel] [PATCH 14/19] hw/net: 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 , Jason Wang , Beniamino Galvani , qemu-arm@nongnu.org, Peter Chubb 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/net/allwinner_emac.c | 2 +- hw/net/imx_fec.c | 2 +- hw/net/lan9118.c | 4 ++-- hw/net/lance.c | 2 +- hw/net/smc91c111.c | 2 +- hw/net/stellaris_enet.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/net/allwinner_emac.c b/hw/net/allwinner_emac.c index e055a661c4..84b48b1774 100644 --- a/hw/net/allwinner_emac.c +++ b/hw/net/allwinner_emac.c @@ -421,7 +421,7 @@ static void aw_emac_set_link(NetClientState *nc) static const MemoryRegionOps aw_emac_mem_ops =3D { .read =3D aw_emac_read, .write =3D aw_emac_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .valid =3D { .min_access_size =3D 4, .max_access_size =3D 4, diff --git a/hw/net/imx_fec.c b/hw/net/imx_fec.c index bd99236864..0f3dd7e8e4 100644 --- a/hw/net/imx_fec.c +++ b/hw/net/imx_fec.c @@ -1285,7 +1285,7 @@ static const MemoryRegionOps imx_eth_ops =3D { .write =3D imx_eth_write, .valid.min_access_size =3D 4, .valid.max_access_size =3D 4, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void imx_eth_cleanup(NetClientState *nc) diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c index 8bba2a8056..498a6acfe9 100644 --- a/hw/net/lan9118.c +++ b/hw/net/lan9118.c @@ -1308,13 +1308,13 @@ static uint64_t lan9118_16bit_mode_read(void *opaqu= e, hwaddr offset, static const MemoryRegionOps lan9118_mem_ops =3D { .read =3D lan9118_readl, .write =3D lan9118_writel, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static const MemoryRegionOps lan9118_16bit_mem_ops =3D { .read =3D lan9118_16bit_mode_read, .write =3D lan9118_16bit_mode_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static NetClientInfo net_lan9118_info =3D { diff --git a/hw/net/lance.c b/hw/net/lance.c index 6631e2a4e0..27dfa3a688 100644 --- a/hw/net/lance.c +++ b/hw/net/lance.c @@ -76,7 +76,7 @@ static uint64_t lance_mem_read(void *opaque, hwaddr addr, static const MemoryRegionOps lance_mem_ops =3D { .read =3D lance_mem_read, .write =3D lance_mem_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, .valid =3D { .min_access_size =3D 2, .max_access_size =3D 2, diff --git a/hw/net/smc91c111.c b/hw/net/smc91c111.c index e574635969..50cd6fc140 100644 --- a/hw/net/smc91c111.c +++ b/hw/net/smc91c111.c @@ -760,7 +760,7 @@ static const MemoryRegionOps smc91c111_mem_ops =3D { .write =3D smc91c111_writefn, .valid.min_access_size =3D 1, .valid.max_access_size =3D 4, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static NetClientInfo net_smc91c111_info =3D { diff --git a/hw/net/stellaris_enet.c b/hw/net/stellaris_enet.c index 3aca2a09f3..5dfd43b3f2 100644 --- a/hw/net/stellaris_enet.c +++ b/hw/net/stellaris_enet.c @@ -459,7 +459,7 @@ static void stellaris_enet_write(void *opaque, hwaddr o= ffset, static const MemoryRegionOps stellaris_enet_ops =3D { .read =3D stellaris_enet_read, .write =3D stellaris_enet_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void stellaris_enet_reset(DeviceState *dev) --=20 2.23.0 From nobody Tue Nov 11 22:32:22 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=1566830694; cv=none; d=zoho.com; s=zohoarc; b=EyKyLHBik5j/MIMtyaj3mb6t7nbcUk4TEJkwDkQltIRqe/8fRs6Qtk6RExf4wDN2YTyyPVsZmcq9Iy0JitnjXouywvVNBS70MJbzuFFO35iHD3k1Ge9JZsBd0dIGagebneZEZUmF4fVrPJ6tWd/WayGUyvjHlyqkPe+uK+hnRAM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566830694; 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=bc9SXnj27EohfZrX85WVnB5PSt33P+oiGRXPNUHDqY0=; b=IfFZETduZdWkzfyLttdw2+MZMiv49XJtlhoK6YAePeLrXRALQw+C1Dzl/0hBULvrloQLVDufjag0XFJVEsu8S1xnxmyKkB+WjJMPS1OsD15ZYrasMQ3IVjXUTWyEXpjkIJwlS6pLfakjz4RGWUwj0vyy0gJJ4XF9cZwwotRdjh8= 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 1566830693984285.7730479540219; Mon, 26 Aug 2019 07:44:53 -0700 (PDT) Received: from localhost ([::1]:54012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2GEm-0000mY-GT for importer@patchew.org; Mon, 26 Aug 2019 10:44:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42913) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2FqD-0004cj-2Q for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:19:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2FqB-0000mh-0g for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:19:28 -0400 Received: from nsstlmta09p.bpe.bigpond.com ([203.38.21.9]:36335) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i2Fq9-0000hk-Mh; Mon, 26 Aug 2019 10:19:26 -0400 Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep09p-svc.bpe.nexus.telstra.com.au with ESMTP id <20190826141919.NTWB7749.nsstlfep09p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com>; Tue, 27 Aug 2019 00:19:19 +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 5D3692920D8AE225; Tue, 27 Aug 2019 00:19:19 +1000 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduvddrudehgedgjeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuffpveftpgfvgffnuffvtfetpdfqfgfvnecuuegrihhlohhuthemucegtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhonhihucfpghhuhigvnhcuoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecukfhppeehkedrudejfedrleekrdeikeenucfrrghrrghmpehhvghlohepuggsiidrthgvlhhsthhrrgdrtghomhdrrghupdhinhgvthepheekrddujeefrdelkedrieekpdhmrghilhhfrhhomhepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqpdhrtghpthhtohepoegrmhgrrhhkohhvihgtseifrghvvggtohhmphdrtghomheqpdhrtghpthhtohepoegrrhhikhgrlhhoseifrghvvggtohhmphdrtghomheqpdhrtghpthhtohepoehmrghrtggvlhdrrghpfhgvlhgsrghumhesghhmrghilhdrtghomheqpdhrtghpthhtohepoehmshhtsehrvgguhhgrthdrtghomheqpdhrtghpthhtohepoehpvghtvghrrdhmrgihuggvlhhlsehlihhnrghrohdrohhrgheqpdhrtghpthhtohepoehqvghmuhdqrghrmhesnhhonhhgnhhurdhorhhgqedprhgtphhtthhopeeoqhgvmhhuqdguvghvvghlsehnohhnghhnuhdrohhrgheqpdhrtghpthhtohepoehtohhnhidrnhhguhih vghnsegsthdrtghomheqnecuvehluhhsthgvrhfuihiivgeptd 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:41 +1000 Message-Id: <87cd1574f808550f03e784f327245dc5c0afa061.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.9 Subject: [Qemu-devel] [PATCH 15/19] hw/pci-host: 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 , Aleksandar Markovic , Peter Maydell , Aleksandar Rikalo , "Michael S. Tsirkin" , qemu-arm@nongnu.org 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/pci-host/bonito.c | 2 +- hw/pci-host/q35.c | 2 +- hw/pci-host/versatile.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index ceee463a11..c4bb9239b0 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -526,7 +526,7 @@ static const MemoryRegionOps bonito_spciconf_ops =3D { .valid.max_access_size =3D 4, .impl.min_access_size =3D 1, .impl.max_access_size =3D 4, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 #define BONITO_IRQ_BASE 32 diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index 158d270b9f..485e2a02af 100644 --- a/hw/pci-host/q35.c +++ b/hw/pci-host/q35.c @@ -289,7 +289,7 @@ static void tseg_blackhole_write(void *opaque, hwaddr a= ddr, uint64_t val, static const MemoryRegionOps tseg_blackhole_ops =3D { .read =3D tseg_blackhole_read, .write =3D tseg_blackhole_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .valid.min_access_size =3D 1, .valid.max_access_size =3D 4, .impl.min_access_size =3D 4, diff --git a/hw/pci-host/versatile.c b/hw/pci-host/versatile.c index b731d0544f..df7212237d 100644 --- a/hw/pci-host/versatile.c +++ b/hw/pci-host/versatile.c @@ -243,7 +243,7 @@ static uint64_t pci_vpb_reg_read(void *opaque, hwaddr a= ddr, static const MemoryRegionOps pci_vpb_reg_ops =3D { .read =3D pci_vpb_reg_read, .write =3D pci_vpb_reg_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .valid =3D { .min_access_size =3D 4, .max_access_size =3D 4, @@ -309,7 +309,7 @@ static uint64_t pci_vpb_config_read(void *opaque, hwadd= r addr, static const MemoryRegionOps pci_vpb_config_ops =3D { .read =3D pci_vpb_config_read, .write =3D pci_vpb_config_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static int pci_vpb_map_irq(PCIDevice *d, int irq_num) --=20 2.23.0 From nobody Tue Nov 11 22:32:22 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=1566830469; cv=none; d=zoho.com; s=zohoarc; b=V+UhZGYjKyFddrMkYBl4ECeuXDtUbH57TD2sQSulM7Pw39vPmGe6tmqh3Jns/B8y+2AkFyw+jzv7WmyCgDZdvj7DhRqQlHamSCg/bo3qqFXXoj+Kf56upocnnFLFzFGV4e1mkytT/aH/wJUKkWej9dfUmeoZp5o9ggsenPhgk40= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566830469; 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=EJIXn35PjHtBllneyNN6fz+jZFei7F9KtICryr+7GDw=; b=IxeYUltaY6xm+57A1omOpTHC4an0+umgmygiqrpZPllfttNBpi3jEAWGD7PsEG8WPFbdHbzGJKxhPfsrN+ozZT+ZnY6tyHTgV2GSnJv00UtTW+bxwcoH2XtHxdgBO9ruLmCvixbTOY1roWk99h/wsY788DuxFSnaRfVFwQjuXjw= 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 1566830469588512.7766287236544; Mon, 26 Aug 2019 07:41:09 -0700 (PDT) Received: from localhost ([::1]:53876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2GB9-0005k2-MA for importer@patchew.org; Mon, 26 Aug 2019 10:41:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42914) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2FqD-0004ck-2l for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:19:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2FqB-0000mj-0u for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:19:28 -0400 Received: from nsstlmta10p.bpe.bigpond.com ([203.38.21.10]:52373) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i2Fq9-0000iU-Lu; Mon, 26 Aug 2019 10:19:26 -0400 Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep10p-svc.bpe.nexus.telstra.com.au with ESMTP id <20190826141920.RFIB6772.nsstlfep10p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com>; Tue, 27 Aug 2019 00:19:20 +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 5D3692920D8AE26B; Tue, 27 Aug 2019 00:19:20 +1000 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduvddrudehgedgjeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuffpveftpgfvgffnuffvtfetpdfqfgfvnecuuegrihhlohhuthemucegtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhonhihucfpghhuhigvnhcuoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecukfhppeehkedrudejfedrleekrdeikeenucfrrghrrghmpehhvghlohepuggsiidrthgvlhhsthhrrgdrtghomhdrrghupdhinhgvthepheekrddujeefrdelkedrieekpdhmrghilhhfrhhomhepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqpdhrtghpthhtohepoehpvghtvghrrdhmrgihuggvlhhlsehlihhnrghrohdrohhrgheqpdhrtghpthhtohepoehqvghmuhdqrghrmhesnhhonhhgnhhurdhorhhgqedprhgtphhtthhopeeoqhgvmhhuqdguvghvvghlsehnohhnghhnuhdrohhrgheqpdhrtghpthhtohepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecuvehluhhsthgvrhfuihiivgepud 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:42 +1000 Message-Id: <6872c03a28301c3e421b9ae8b1aa9555c5c26f90.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.10 Subject: [Qemu-devel] [PATCH 16/19] hw/sd: 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 , qemu-arm@nongnu.org, Peter Maydell 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/sd/pl181.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c index 8033fe455d..f19d8764e8 100644 --- a/hw/sd/pl181.c +++ b/hw/sd/pl181.c @@ -451,7 +451,7 @@ static void pl181_write(void *opaque, hwaddr offset, static const MemoryRegionOps pl181_ops =3D { .read =3D pl181_read, .write =3D pl181_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void pl181_reset(DeviceState *d) --=20 2.23.0 From nobody Tue Nov 11 22:32:22 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=1566830696; cv=none; d=zoho.com; s=zohoarc; b=l9XXf644beg8xqqbsMTthw/dSK7xg/ZsNF3dcQy2mahVd2+GWU60sbprRXBbzsfJ4VianOgLY+PqVDRIBr5diVw/G+S6n2CZyxx1dxqvTWu2hiN7DM7VhIXXg2Y1e9Tt3z2G6hr5PCu9Onv0QmntDzfffICKNctYQZQw8nxkPUw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566830696; 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=UX8P26c31M+rCEoyJuKagpve2bs867NolKhEqaIdbcM=; b=LKFYbFlYrRhmCQVoWhfaS2CftBYvWqHzf+yw4PmsVW2qv8yUPHpGHvEIpjstSsVfbVue5JUTij+ye3laD75KwywYPim9js2migb0fsGuWWTcbyayp/mUeq97YnGjnpnVCWhF1V1miwMDqv8AvwRebMGm31KeSZuH2RltMIh4vdY= 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 1566830696151235.08873462704537; Mon, 26 Aug 2019 07:44:56 -0700 (PDT) Received: from localhost ([::1]:54010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2GEk-0000lB-Lq for importer@patchew.org; Mon, 26 Aug 2019 10:44:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42938) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2FqE-0004gF-9W for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:19:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2FqD-0000oP-2V for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:19:30 -0400 Received: from nsstlmta40p.bpe.bigpond.com ([203.38.21.40]:57903) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i2FqB-0000jX-Jj; Mon, 26 Aug 2019 10:19:28 -0400 Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep40p-svc.bpe.nexus.telstra.com.au with ESMTP id <20190826141922.EPIO32345.nsstlfep40p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com>; Tue, 27 Aug 2019 00:19:22 +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 5D3692920D8AE2C1; Tue, 27 Aug 2019 00:19:21 +1000 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduvddrudehgedgjeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuffpveftpgfvgffnuffvtfetpdfqfgfvnecuuegrihhlohhuthemucegtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhonhihucfpghhuhigvnhcuoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecukfhppeehkedrudejfedrleekrdeikeenucfrrghrrghmpehhvghlohepuggsiidrthgvlhhsthhrrgdrtghomhdrrghupdhinhgvthepheekrddujeefrdelkedrieekpdhmrghilhhfrhhomhepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqpdhrtghpthhtohepoegrlhhishhtrghirhesrghlihhsthgrihhrvdefrdhmvgeqpdhrtghpthhtohepoehpvghtvghrrdhmrgihuggvlhhlsehlihhnrghrohdrohhrgheqpdhrtghpthhtohepoehqvghmuhdqrghrmhesnhhonhhgnhhurdhorhhgqedprhgtphhtthhopeeoqhgvmhhuqdguvghvvghlsehnohhnghhnuhdrohhrgheqpdhrtghpthhtohepoehsuhhnuggvvghprdhlkhhmlhesghhmrghilhdrtghomheqpdhrtghpthhtohepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecuvehluhhsthgvrhfuihiivgepud 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:43 +1000 Message-Id: <90f3db90a7a1aca45f7741ee42842f29f83077ff.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.40 Subject: [Qemu-devel] [PATCH 17/19] 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 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/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 From nobody Tue Nov 11 22:32:22 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=1566830929; cv=none; d=zoho.com; s=zohoarc; b=HHJqequcYESCzN/xIDr2K8VSMqYFhzZJ/uEboYpqUw3EfL9Sz6yXg8YPJSeXYD9WRrQXSnQhc+HcIPT6oXv24TqjvGzqge002WEd4JhyJpViofBJ7FTpKrvMpRkBbN0Uq/pj80diL+68Df/CGPxJzd96fblcp9priQSsXWTMd44= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566830929; 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=WDhyUFadOFe0GyQODxeB4vhDKXnnF8pjPafFaQv1gEc=; b=MYj9pjTEfCN3f9ntmGOclgrVsHHIzhPDUoTwA3pp+CIZmnEXfmYRSvYrMog5K4loVNigY1FJQ5jd0Xoc3hCpQEjyq7lHeXcr0uBS77lDgBLXKCqx4AvthSLhvLIkGBmaESNATm/4XirdIr6LGwra276kX4NXOc3R/d95rZHkFvw= 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 156683092903152.78823781009032; Mon, 26 Aug 2019 07:48:49 -0700 (PDT) Received: from localhost ([::1]:54048 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2GIW-0003PG-2Z for importer@patchew.org; Mon, 26 Aug 2019 10:48:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42992) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2FqK-0004nV-VM for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:19:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2FqJ-0000st-5u for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:19:36 -0400 Received: from nsstlmta13p.bpe.bigpond.com ([203.38.21.13]:44603) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i2FqI-0000p8-AM; Mon, 26 Aug 2019 10:19:35 -0400 Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep13p-svc.bpe.nexus.telstra.com.au with ESMTP id <20190826141929.HJBK22385.nsstlfep13p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com>; Tue, 27 Aug 2019 00:19:29 +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 5D3692920D8AE4A5; Tue, 27 Aug 2019 00:19:28 +1000 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduvddrudehgedgjeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuffpveftpgfvgffnuffvtfetpdfqfgfvnecuuegrihhlohhuthemucegtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhonhihucfpghhuhigvnhcuoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecukfhppeehkedrudejfedrleekrdeikeenucfrrghrrghmpehhvghlohepuggsiidrthgvlhhsthhrrgdrtghomhdrrghupdhinhgvthepheekrddujeefrdelkedrieekpdhmrghilhhfrhhomhepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqpdhrtghpthhtohepoegrlhhishhtrghirhesrghlihhsthgrihhrvdefrdhmvgeqpdhrtghpthhtohepoegrnhgurhgvfiesrghjrdhiugdrrghuqedprhgtphhtthhopeeorghtrghrgehqvghmuhesghhmrghilhdrtghomheqpdhrtghpthhtohepoegthhhouhhtvggruhesrggurggtohhrvgdrtghomheqpdhrtghpthhtohepoegtlhhgsehkrghougdrohhrgheqpdhrtghpthhtohepoegvughgrghrrdhighhlvghsihgrshesghhmrghilhdrtghomheqpdhrtghpthhtohepoehfrhgvuggvrhhitgdrkhhonhhrrggusegruggrtghorhgvrdgtohhmqedprhgtphhtthhopeeoghigthesmhhprhgtrdhpkhhurdgvughu rdgtnheqpdhrtghpthhtohepoehjohgvlhesjhhmshdrihgurdgruheqpdhrtghpthhtohepoehmrghrkhdrtggrvhgvqdgrhihlrghnugesihhlrghnuggvrdgtohdruhhkqedprhgtphhtthhopeeomhhitghhrggvlhesfigrlhhlvgdrtggtqedprhgtphhtthhopeeomhhsthesrhgvughhrghtrdgtohhmqedprhgtphhtthhopeeophgsohhniihinhhisehrvgguhhgrthdrtghomheqpdhrtghpthhtohepoehpvghtvghrrdgthhhusggssehnihgtthgrrdgtohhmrdgruheqpdhrtghpthhtohepoehpvghtvghrrdhmrgihuggvlhhlsehlihhnrghrohdrohhrgheqpdhrtghpthhtohepoehqvghmuhdqrghrmhesnhhonhhgnhhurdhorhhgqedprhgtphhtthhopeeoqhgvmhhuqdguvghvvghlsehnohhnghhnuhdrohhrgheqpdhrtghpthhtohepoehsuhhnuggvvghprdhlkhhmlhesghhmrghilhdrtghomheqpdhrtghpthhtohepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecuvehluhhsthgvrhfuihiivgepfe 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:44 +1000 Message-Id: <9fde52f9085bd7ad607bf2372931178e4a01fabd.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.13 Subject: [Qemu-devel] [PATCH 18/19] hw/timer: 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 , Andrew Jeffery , Alistair Francis , Mark Cave-Ayland , Michael Walle , Fabien Chouteau , Subbaraya Sundeep , Peter Chubb , KONRAD Frederic , qemu-arm@nongnu.org, "Michael S. Tsirkin" , Joel Stanley , Paolo Bonzini , "Edgar E. Iglesias" , Guan Xuetao , Artyom Tarasenko , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= 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/timer/a9gtimer.c | 4 ++-- hw/timer/arm_mptimer.c | 4 ++-- hw/timer/arm_timer.c | 4 ++-- hw/timer/armv7m_systick.c | 2 +- hw/timer/aspeed_rtc.c | 2 +- hw/timer/cadence_ttc.c | 2 +- hw/timer/grlib_gptimer.c | 2 +- hw/timer/hpet.c | 2 +- hw/timer/imx_epit.c | 2 +- hw/timer/imx_gpt.c | 2 +- hw/timer/lm32_timer.c | 2 +- hw/timer/milkymist-sysctl.c | 2 +- hw/timer/mss-timer.c | 2 +- hw/timer/pl031.c | 2 +- hw/timer/puv3_ost.c | 2 +- hw/timer/slavio_timer.c | 2 +- hw/timer/stm32f2xx_timer.c | 2 +- hw/timer/sun4v-rtc.c | 2 +- 18 files changed, 21 insertions(+), 21 deletions(-) diff --git a/hw/timer/a9gtimer.c b/hw/timer/a9gtimer.c index 4c634c83b1..475f01323f 100644 --- a/hw/timer/a9gtimer.c +++ b/hw/timer/a9gtimer.c @@ -258,7 +258,7 @@ static const MemoryRegionOps a9_gtimer_this_ops =3D { .min_access_size =3D 4, .max_access_size =3D 4, }, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static const MemoryRegionOps a9_gtimer_ops =3D { @@ -268,7 +268,7 @@ static const MemoryRegionOps a9_gtimer_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 a9_gtimer_reset(DeviceState *dev) diff --git a/hw/timer/arm_mptimer.c b/hw/timer/arm_mptimer.c index 9f63abef10..cced899640 100644 --- a/hw/timer/arm_mptimer.c +++ b/hw/timer/arm_mptimer.c @@ -194,7 +194,7 @@ static const MemoryRegionOps arm_thistimer_ops =3D { .min_access_size =3D 4, .max_access_size =3D 4, }, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static const MemoryRegionOps timerblock_ops =3D { @@ -204,7 +204,7 @@ static const MemoryRegionOps timerblock_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 timerblock_reset(TimerBlock *tb) diff --git a/hw/timer/arm_timer.c b/hw/timer/arm_timer.c index c2e6211188..f95c897d05 100644 --- a/hw/timer/arm_timer.c +++ b/hw/timer/arm_timer.c @@ -267,7 +267,7 @@ static void sp804_write(void *opaque, hwaddr offset, static const MemoryRegionOps sp804_ops =3D { .read =3D sp804_read, .write =3D sp804_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static const VMStateDescription vmstate_sp804 =3D { @@ -348,7 +348,7 @@ static void icp_pit_write(void *opaque, hwaddr offset, static const MemoryRegionOps icp_pit_ops =3D { .read =3D icp_pit_read, .write =3D icp_pit_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void icp_pit_init(Object *obj) diff --git a/hw/timer/armv7m_systick.c b/hw/timer/armv7m_systick.c index 85d122dbcb..b8003e2962 100644 --- a/hw/timer/armv7m_systick.c +++ b/hw/timer/armv7m_systick.c @@ -193,7 +193,7 @@ static MemTxResult systick_write(void *opaque, hwaddr a= ddr, static const MemoryRegionOps systick_ops =3D { .read_with_attrs =3D systick_read, .write_with_attrs =3D systick_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .valid.min_access_size =3D 4, .valid.max_access_size =3D 4, }; diff --git a/hw/timer/aspeed_rtc.c b/hw/timer/aspeed_rtc.c index 5313017353..e3bd196dc0 100644 --- a/hw/timer/aspeed_rtc.c +++ b/hw/timer/aspeed_rtc.c @@ -131,7 +131,7 @@ static void aspeed_rtc_reset(DeviceState *d) static const MemoryRegionOps aspeed_rtc_ops =3D { .read =3D aspeed_rtc_read, .write =3D aspeed_rtc_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static const VMStateDescription vmstate_aspeed_rtc =3D { diff --git a/hw/timer/cadence_ttc.c b/hw/timer/cadence_ttc.c index 5e3128c1e3..6155d0055f 100644 --- a/hw/timer/cadence_ttc.c +++ b/hw/timer/cadence_ttc.c @@ -391,7 +391,7 @@ static void cadence_ttc_write(void *opaque, hwaddr offs= et, static const MemoryRegionOps cadence_ttc_ops =3D { .read =3D cadence_ttc_read, .write =3D cadence_ttc_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void cadence_timer_reset(CadenceTimerState *s) diff --git a/hw/timer/grlib_gptimer.c b/hw/timer/grlib_gptimer.c index 32dbf870d4..df84735197 100644 --- a/hw/timer/grlib_gptimer.c +++ b/hw/timer/grlib_gptimer.c @@ -315,7 +315,7 @@ static void grlib_gptimer_write(void *opaque, hwaddr ad= dr, static const MemoryRegionOps grlib_gptimer_ops =3D { .read =3D grlib_gptimer_read, .write =3D grlib_gptimer_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, .valid =3D { .min_access_size =3D 4, .max_access_size =3D 4, diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c index 1ddae4e7d7..380abeb709 100644 --- a/hw/timer/hpet.c +++ b/hw/timer/hpet.c @@ -676,7 +676,7 @@ static const MemoryRegionOps hpet_ram_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 hpet_reset(DeviceState *d) diff --git a/hw/timer/imx_epit.c b/hw/timer/imx_epit.c index f54e059910..7e605d29c7 100644 --- a/hw/timer/imx_epit.c +++ b/hw/timer/imx_epit.c @@ -284,7 +284,7 @@ static void imx_epit_cmp(void *opaque) static const MemoryRegionOps imx_epit_ops =3D { .read =3D imx_epit_read, .write =3D imx_epit_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static const VMStateDescription vmstate_imx_timer_epit =3D { diff --git a/hw/timer/imx_gpt.c b/hw/timer/imx_gpt.c index 49a441f451..27bacdb758 100644 --- a/hw/timer/imx_gpt.c +++ b/hw/timer/imx_gpt.c @@ -476,7 +476,7 @@ static void imx_gpt_timeout(void *opaque) static const MemoryRegionOps imx_gpt_ops =3D { .read =3D imx_gpt_read, .write =3D imx_gpt_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 =20 diff --git a/hw/timer/lm32_timer.c b/hw/timer/lm32_timer.c index ac3edaff4f..4c0d3275e7 100644 --- a/hw/timer/lm32_timer.c +++ b/hw/timer/lm32_timer.c @@ -146,7 +146,7 @@ static void timer_write(void *opaque, hwaddr addr, static const MemoryRegionOps timer_ops =3D { .read =3D timer_read, .write =3D timer_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, .valid =3D { .min_access_size =3D 4, .max_access_size =3D 4, diff --git a/hw/timer/milkymist-sysctl.c b/hw/timer/milkymist-sysctl.c index 958350767a..cb117f944e 100644 --- a/hw/timer/milkymist-sysctl.c +++ b/hw/timer/milkymist-sysctl.c @@ -223,7 +223,7 @@ static const MemoryRegionOps sysctl_mmio_ops =3D { .min_access_size =3D 4, .max_access_size =3D 4, }, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, }; =20 static void timer0_hit(void *opaque) diff --git a/hw/timer/mss-timer.c b/hw/timer/mss-timer.c index 45f1cf42f9..b9edb39837 100644 --- a/hw/timer/mss-timer.c +++ b/hw/timer/mss-timer.c @@ -200,7 +200,7 @@ timer_write(void *opaque, hwaddr offset, static const MemoryRegionOps timer_ops =3D { .read =3D timer_read, .write =3D timer_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/timer/pl031.c b/hw/timer/pl031.c index 2b3e261006..7ac2a0ca37 100644 --- a/hw/timer/pl031.c +++ b/hw/timer/pl031.c @@ -178,7 +178,7 @@ static void pl031_write(void * opaque, hwaddr offset, static const MemoryRegionOps pl031_ops =3D { .read =3D pl031_read, .write =3D pl031_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void pl031_init(Object *obj) diff --git a/hw/timer/puv3_ost.c b/hw/timer/puv3_ost.c index 6fe370049b..3af7d5be37 100644 --- a/hw/timer/puv3_ost.c +++ b/hw/timer/puv3_ost.c @@ -99,7 +99,7 @@ static const MemoryRegionOps puv3_ost_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 puv3_ost_tick(void *opaque) diff --git a/hw/timer/slavio_timer.c b/hw/timer/slavio_timer.c index 38fd32b62a..dbe796a3dc 100644 --- a/hw/timer/slavio_timer.c +++ b/hw/timer/slavio_timer.c @@ -322,7 +322,7 @@ static void slavio_timer_mem_writel(void *opaque, hwadd= r addr, static const MemoryRegionOps slavio_timer_mem_ops =3D { .read =3D slavio_timer_mem_readl, .write =3D slavio_timer_mem_writel, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, .valid =3D { .min_access_size =3D 4, .max_access_size =3D 4, diff --git a/hw/timer/stm32f2xx_timer.c b/hw/timer/stm32f2xx_timer.c index edc557a4b9..88ae286b14 100644 --- a/hw/timer/stm32f2xx_timer.c +++ b/hw/timer/stm32f2xx_timer.c @@ -268,7 +268,7 @@ static void stm32f2xx_timer_write(void *opaque, hwaddr = offset, static const MemoryRegionOps stm32f2xx_timer_ops =3D { .read =3D stm32f2xx_timer_read, .write =3D stm32f2xx_timer_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static const VMStateDescription vmstate_stm32f2xx_timer =3D { diff --git a/hw/timer/sun4v-rtc.c b/hw/timer/sun4v-rtc.c index 54272a822f..0e831c91b1 100644 --- a/hw/timer/sun4v-rtc.c +++ b/hw/timer/sun4v-rtc.c @@ -47,7 +47,7 @@ static void sun4v_rtc_write(void *opaque, hwaddr addr, static const MemoryRegionOps sun4v_rtc_ops =3D { .read =3D sun4v_rtc_read, .write =3D sun4v_rtc_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, }; =20 void sun4v_rtc_init(hwaddr addr) --=20 2.23.0 From nobody Tue Nov 11 22:32:22 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=1566829955; cv=none; d=zoho.com; s=zohoarc; b=A4LNkrg0sRhFpdcehUjQnEOi2bRqSOEQHaQF1RlTaIuzzO3gChbeXYPQIu9ubagh2f3+tvTkS2mwicvbHQOUDN3ezMneX9JxU0ROJxCauXSCCCwQBq3E2bOF6FIVBOtT1GgSk1QN5h4T/IbAr8Z1Nt29+GcypATf6mYNm8SjBuY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566829955; 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=fJj+J6E+bK5VzroNqHwrcHW/1V7vBr9jOD5mxQFHhYY=; b=jlIveqAlxxyaywRDBtTvcLaBRhrDl8ZoAhkFuOkcpViTpiwaYdDtkxU9JQp1Jfo1ABCC0k0/LXEv9hUex1BWzb6tKGxr0xEkoHCHklBwXwOVBETIidsHHTeBio0fEXr+/v1wRsiUM/kMtq7syKfEokhMfX2xPpCkzythJ/NtvaI= 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 1566829955593828.3816260336989; Mon, 26 Aug 2019 07:32:35 -0700 (PDT) Received: from localhost ([::1]:53670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2G2n-0006m6-AR for importer@patchew.org; Mon, 26 Aug 2019 10:32:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43011) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2FqP-0004p3-Ji for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:19:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2FqM-0000wv-Sx for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:19:41 -0400 Received: from nsstlmta09p.bpe.bigpond.com ([203.38.21.9]:38679) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i2FqL-0000ru-4h; Mon, 26 Aug 2019 10:19:38 -0400 Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep09p-svc.bpe.nexus.telstra.com.au with ESMTP id <20190826141933.NTWW7749.nsstlfep09p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com>; Tue, 27 Aug 2019 00:19:33 +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 5D3692920D8AE5A1; Tue, 27 Aug 2019 00:19:32 +1000 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduvddrudehgedgjeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuffpveftpgfvgffnuffvtfetpdfqfgfvnecuuegrihhlohhuthemucegtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhonhihucfpghhuhigvnhcuoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecukfhppeehkedrudejfedrleekrdeikeenucfrrghrrghmpehhvghlohepuggsiidrthgvlhhsthhrrgdrtghomhdrrghupdhinhgvthepheekrddujeefrdelkedrieekpdhmrghilhhfrhhomhepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqpdhrtghpthhtohepoegrlhhishhtrghirhesrghlihhsthgrihhrvdefrdhmvgeqpdhrtghpthhtohepoehfrghmsegvuhhphhhonhdrnhgvtheqpdhrtghpthhtohepoehjrghsohifrghnghesrhgvughhrghtrdgtohhmqedprhgtphhtthhopeeokhifohhlfhesrhgvughhrghtrdgtohhmqedprhgtphhtthhopeeomhgrrhgtrghnughrvgdrlhhurhgvrghusehrvgguhhgrthdrtghomheqpdhrtghpthhtohepoehmrhgvihhtiiesrhgvughhrghtrdgtohhmqedprhgtphhtthhopeeomhhsthesrhgvughhrghtrdgtohhmqedprhgtphhtthhopeeophgsohhniihinhhisehrvgguhhgrthdrtghomheqpdhrtghpthht ohepoehqvghmuhdqsghlohgtkhesnhhonhhgnhhurdhorhhgqedprhgtphhtthhopeeoqhgvmhhuqdguvghvvghlsehnohhnghhnuhdrohhrgheqpdhrtghpthhtohepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecuvehluhhsthgvrhfuihiivgepge 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:45 +1000 Message-Id: <824d87bc2059bca369e6be48b556b456b373dc03.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.9 Subject: [Qemu-devel] [PATCH 19/19] build: Correct non-common common-obj-* to obj-* 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: Kevin Wolf , Tony Nguyen , qemu-block@nongnu.org, "Michael S. Tsirkin" , Jason Wang , Alistair Francis , Max Reitz , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Fam Zheng Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Device realizing code with MemorRegionOps endianness as DEVICE_NATIVE_ENDIAN is not common code. Corrected devices were identified by making the declaration of DEVICE_NATIVE_ENDIAN conditional upon NEED_CPU_H and then listing what failed to compile. Signed-off-by: Tony Nguyen --- hw/block/Makefile.objs | 4 ++-- hw/char/Makefile.objs | 4 ++-- hw/display/Makefile.objs | 2 +- hw/dma/Makefile.objs | 4 ++-- hw/input/Makefile.objs | 2 +- hw/intc/Makefile.objs | 2 +- hw/net/Makefile.objs | 2 +- hw/scsi/Makefile.objs | 2 +- hw/ssi/Makefile.objs | 2 +- hw/timer/Makefile.objs | 2 +- hw/virtio/Makefile.objs | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/hw/block/Makefile.objs b/hw/block/Makefile.objs index f5f643f0cc..3d5d80e2e3 100644 --- a/hw/block/Makefile.objs +++ b/hw/block/Makefile.objs @@ -2,8 +2,8 @@ common-obj-y +=3D block.o cdrom.o hd-geometry.o common-obj-$(CONFIG_FDC) +=3D fdc.o common-obj-$(CONFIG_SSI_M25P80) +=3D m25p80.o common-obj-$(CONFIG_NAND) +=3D nand.o -common-obj-$(CONFIG_PFLASH_CFI01) +=3D pflash_cfi01.o -common-obj-$(CONFIG_PFLASH_CFI02) +=3D pflash_cfi02.o +obj-$(CONFIG_PFLASH_CFI01) +=3D pflash_cfi01.o +obj-$(CONFIG_PFLASH_CFI02) +=3D pflash_cfi02.o common-obj-$(CONFIG_XEN) +=3D xen-block.o common-obj-$(CONFIG_ECC) +=3D ecc.o common-obj-$(CONFIG_ONENAND) +=3D onenand.o diff --git a/hw/char/Makefile.objs b/hw/char/Makefile.objs index 02d8a66925..215c02b752 100644 --- a/hw/char/Makefile.objs +++ b/hw/char/Makefile.objs @@ -1,7 +1,6 @@ common-obj-$(CONFIG_IPACK) +=3D ipoctal232.o common-obj-$(CONFIG_ESCC) +=3D escc.o common-obj-$(CONFIG_NRF51_SOC) +=3D nrf51_uart.o -common-obj-$(CONFIG_PARALLEL) +=3D parallel.o common-obj-$(CONFIG_ISA_BUS) +=3D parallel-isa.o common-obj-$(CONFIG_PL011) +=3D pl011.o common-obj-$(CONFIG_SERIAL) +=3D serial.o @@ -9,7 +8,6 @@ common-obj-$(CONFIG_SERIAL_ISA) +=3D serial-isa.o common-obj-$(CONFIG_SERIAL_PCI) +=3D serial-pci.o common-obj-$(CONFIG_SERIAL_PCI_MULTI) +=3D serial-pci-multi.o common-obj-$(CONFIG_VIRTIO_SERIAL) +=3D virtio-console.o -common-obj-$(CONFIG_XILINX) +=3D xilinx_uartlite.o common-obj-$(CONFIG_XEN) +=3D xen_console.o common-obj-$(CONFIG_CADENCE) +=3D cadence_uart.o =20 @@ -21,6 +19,8 @@ obj-$(CONFIG_PSERIES) +=3D spapr_vty.o obj-$(CONFIG_DIGIC) +=3D digic-uart.o obj-$(CONFIG_STM32F2XX_USART) +=3D stm32f2xx_usart.o obj-$(CONFIG_RASPI) +=3D bcm2835_aux.o +obj-$(CONFIG_PARALLEL) +=3D parallel.o +obj-$(CONFIG_XILINX) +=3D xilinx_uartlite.o =20 common-obj-$(CONFIG_CMSDK_APB_UART) +=3D cmsdk-apb-uart.o common-obj-$(CONFIG_ETRAXFS) +=3D etraxfs_ser.o diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs index 0f11d55b14..8d3be95cbd 100644 --- a/hw/display/Makefile.objs +++ b/hw/display/Makefile.objs @@ -17,7 +17,7 @@ common-obj-$(CONFIG_XEN) +=3D xenfb.o =20 common-obj-$(CONFIG_VGA_PCI) +=3D vga-pci.o common-obj-$(CONFIG_VGA_ISA) +=3D vga-isa.o -common-obj-$(CONFIG_VGA_ISA_MM) +=3D vga-isa-mm.o +obj-$(CONFIG_VGA_ISA_MM) +=3D vga-isa-mm.o common-obj-$(CONFIG_VMWARE_VGA) +=3D vmware_vga.o common-obj-$(CONFIG_BOCHS_DISPLAY) +=3D bochs-display.o =20 diff --git a/hw/dma/Makefile.objs b/hw/dma/Makefile.objs index b672e7a522..61021d8797 100644 --- a/hw/dma/Makefile.objs +++ b/hw/dma/Makefile.objs @@ -1,10 +1,10 @@ common-obj-$(CONFIG_PUV3) +=3D puv3_dma.o -common-obj-$(CONFIG_RC4030) +=3D rc4030.o +obj-$(CONFIG_RC4030) +=3D rc4030.o common-obj-$(CONFIG_PL080) +=3D pl080.o common-obj-$(CONFIG_PL330) +=3D pl330.o common-obj-$(CONFIG_I82374) +=3D i82374.o common-obj-$(CONFIG_I8257) +=3D i8257.o -common-obj-$(CONFIG_XILINX_AXI) +=3D xilinx_axidma.o +obj-$(CONFIG_XILINX_AXI) +=3D xilinx_axidma.o common-obj-$(CONFIG_ZYNQ_DEVCFG) +=3D xlnx-zynq-devcfg.o common-obj-$(CONFIG_ETRAXFS) +=3D etraxfs_dma.o common-obj-$(CONFIG_STP2000) +=3D sparc32_dma.o diff --git a/hw/input/Makefile.objs b/hw/input/Makefile.objs index a1bc502ed0..e28f84428d 100644 --- a/hw/input/Makefile.objs +++ b/hw/input/Makefile.objs @@ -1,7 +1,7 @@ common-obj-$(CONFIG_ADB) +=3D adb.o adb-mouse.o adb-kbd.o common-obj-y +=3D hid.o common-obj-$(CONFIG_LM832X) +=3D lm832x.o -common-obj-$(CONFIG_PCKBD) +=3D pckbd.o +obj-$(CONFIG_PCKBD) +=3D pckbd.o common-obj-$(CONFIG_PL050) +=3D pl050.o common-obj-$(CONFIG_PS2) +=3D ps2.o common-obj-$(CONFIG_STELLARIS_INPUT) +=3D stellaris_input.o diff --git a/hw/intc/Makefile.objs b/hw/intc/Makefile.objs index f726d87532..660c6da00c 100644 --- a/hw/intc/Makefile.objs +++ b/hw/intc/Makefile.objs @@ -2,7 +2,7 @@ common-obj-$(CONFIG_HEATHROW_PIC) +=3D heathrow_pic.o common-obj-$(CONFIG_I8259) +=3D i8259_common.o i8259.o common-obj-$(CONFIG_PL190) +=3D pl190.o common-obj-$(CONFIG_PUV3) +=3D puv3_intc.o -common-obj-$(CONFIG_XILINX) +=3D xilinx_intc.o +obj-$(CONFIG_XILINX) +=3D xilinx_intc.o common-obj-$(CONFIG_XLNX_ZYNQMP_PMU) +=3D xlnx-pmu-iomod-intc.o common-obj-$(CONFIG_XLNX_ZYNQMP) +=3D xlnx-zynqmp-ipi.o common-obj-$(CONFIG_ETRAXFS) +=3D etraxfs_pic.o diff --git a/hw/net/Makefile.objs b/hw/net/Makefile.objs index 9904273b06..8526611606 100644 --- a/hw/net/Makefile.objs +++ b/hw/net/Makefile.objs @@ -1,4 +1,4 @@ -common-obj-$(CONFIG_DP8393X) +=3D dp8393x.o +obj-$(CONFIG_DP8393X) +=3D dp8393x.o common-obj-$(CONFIG_XEN) +=3D xen_nic.o common-obj-$(CONFIG_NE2000_COMMON) +=3D ne2000.o =20 diff --git a/hw/scsi/Makefile.objs b/hw/scsi/Makefile.objs index 54b36ed8b1..418af9a7ec 100644 --- a/hw/scsi/Makefile.objs +++ b/hw/scsi/Makefile.objs @@ -4,7 +4,7 @@ common-obj-$(CONFIG_LSI_SCSI_PCI) +=3D lsi53c895a.o common-obj-$(CONFIG_MPTSAS_SCSI_PCI) +=3D mptsas.o mptconfig.o mptendian.o common-obj-$(CONFIG_MEGASAS_SCSI_PCI) +=3D megasas.o common-obj-$(CONFIG_VMW_PVSCSI_SCSI_PCI) +=3D vmw_pvscsi.o -common-obj-$(CONFIG_ESP) +=3D esp.o +obj-$(CONFIG_ESP) +=3D esp.o common-obj-$(CONFIG_ESP_PCI) +=3D esp-pci.o obj-$(CONFIG_SPAPR_VSCSI) +=3D spapr_vscsi.o =20 diff --git a/hw/ssi/Makefile.objs b/hw/ssi/Makefile.objs index f5bcc65fe7..54b5542c22 100644 --- a/hw/ssi/Makefile.objs +++ b/hw/ssi/Makefile.objs @@ -1,6 +1,6 @@ common-obj-$(CONFIG_PL022) +=3D pl022.o common-obj-$(CONFIG_SSI) +=3D ssi.o -common-obj-$(CONFIG_XILINX_SPI) +=3D xilinx_spi.o +obj-$(CONFIG_XILINX_SPI) +=3D xilinx_spi.o common-obj-$(CONFIG_XILINX_SPIPS) +=3D xilinx_spips.o common-obj-$(CONFIG_ASPEED_SOC) +=3D aspeed_smc.o common-obj-$(CONFIG_STM32F2XX_SPI) +=3D stm32f2xx_spi.o diff --git a/hw/timer/Makefile.objs b/hw/timer/Makefile.objs index 123d92c969..1c249cc34e 100644 --- a/hw/timer/Makefile.objs +++ b/hw/timer/Makefile.objs @@ -14,7 +14,7 @@ endif common-obj-$(CONFIG_PL031) +=3D pl031.o common-obj-$(CONFIG_PUV3) +=3D puv3_ost.o common-obj-$(CONFIG_TWL92230) +=3D twl92230.o -common-obj-$(CONFIG_XILINX) +=3D xilinx_timer.o +obj-$(CONFIG_XILINX) +=3D xilinx_timer.o common-obj-$(CONFIG_SLAVIO) +=3D slavio_timer.o common-obj-$(CONFIG_ETRAXFS) +=3D etraxfs_timer.o common-obj-$(CONFIG_GRLIB) +=3D grlib_gptimer.o diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs index 964ce78607..573b1a9e31 100644 --- a/hw/virtio/Makefile.objs +++ b/hw/virtio/Makefile.objs @@ -8,7 +8,7 @@ obj-$(CONFIG_VHOST_USER) +=3D vhost-user.o =20 common-obj-$(CONFIG_VIRTIO_RNG) +=3D virtio-rng.o common-obj-$(CONFIG_VIRTIO_PCI) +=3D virtio-pci.o -common-obj-$(CONFIG_VIRTIO_MMIO) +=3D virtio-mmio.o +obj-$(CONFIG_VIRTIO_MMIO) +=3D virtio-mmio.o obj-$(CONFIG_VIRTIO_BALLOON) +=3D virtio-balloon.o obj-$(CONFIG_VIRTIO_CRYPTO) +=3D virtio-crypto.o obj-$(call land,$(CONFIG_VIRTIO_CRYPTO),$(CONFIG_VIRTIO_PCI)) +=3D virtio-= crypto-pci.o --=20 2.23.0