From nobody Sat Nov 23 21:48:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1730918812; cv=none; d=zohomail.com; s=zohoarc; b=UZ31rzXDST9Ry3ZxunF9kADeVtqmEv3TBfKCzk+6I7O/E2jxOeatztVIp5T5X8uhmIARq+tGfFhtVO2+zZhzv8QqgldZkQuWXjoybvTvFkm/LB+8kHOIpeaQy4qV+EHO48CyRyKT73X2M94NGzrDS8IecrFqe6ZblafTFA5CSso= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730918812; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=JkT1yg2VZs3DMTFUZrgUQwWp62WZ2rdU+E0+QzLt/pA=; b=AOq+SRq9cNi1NFQKx7r3G0Em4GhrAdxWH6xtPuf5yiBSHxhrlxFYaZg205EZLWkfdHzXfhl+aA6ujYQACR+9V3k3PUcTSzQkChq4ApIDj3AqCRkjxmupiUvEDja5Ipd7Zr4aKReUaRvEzxhzglohxekS90UKDgTzeO5Z1I+fyHQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730918812230343.50224839599434; Wed, 6 Nov 2024 10:46:52 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8l30-0008Ns-Cq; Wed, 06 Nov 2024 13:46:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t8l2u-0008NC-Dj for qemu-devel@nongnu.org; Wed, 06 Nov 2024 13:46:25 -0500 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8l2s-0000uc-Ls for qemu-devel@nongnu.org; Wed, 06 Nov 2024 13:46:24 -0500 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5cece886771so307697a12.0 for ; Wed, 06 Nov 2024 10:46:22 -0800 (PST) Received: from localhost.localdomain ([154.14.63.34]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cee6b0fc4dsm3129846a12.84.2024.11.06.10.46.18 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 06 Nov 2024 10:46:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730918781; x=1731523581; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JkT1yg2VZs3DMTFUZrgUQwWp62WZ2rdU+E0+QzLt/pA=; b=WeN27aJ9rftVQ7AK8QiaSsU3/vxDQDoNUDm4A+B8uc5/1FdUl1mIwUTThIYFrl+oIj 0y0ZzH1MfMN7zmTeMm4UQbiyFHnLv3pmzM+IYTUMQSvH2sNFNcMRwn08eqor92zy+X2l sPJq5VfdOVf08VHf39tQVx6v9a2uQljnV4rGOVPNBTJdPv3iRwIm+zLpaU1YJvxPWgZR dO2GQDaagWBZgy+dvoibzMIOJ2GW5BGSqVq8bMf1jYiw8x/Wp9UrWz5T699eZ7Tb+mpU n8zmYfe+Kb/rymvN+aYOG84QqNKCCDFoMB08kn8QQlGh8tvXLSRqXS7Ufk2Dwnd4YlNM hZMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730918781; x=1731523581; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JkT1yg2VZs3DMTFUZrgUQwWp62WZ2rdU+E0+QzLt/pA=; b=eTsG3z8yhdSGXMTqpFiexMfdV1xQ3wDg6qLHAsWeei94BrATGCpXZ0xCLv79QUisHJ MBKgJnU+kQsV8aRDteNz/QZfSbrNR6P3m9O2CKsydDmHZmbOrw05isSjZ2ZeTw4QKDci jMY+W8TcH4Admqr7jusnlrOCpZG8igbwuzWu/wX5KOT56z9YRGhlIvBOaOBug3tN3zDB CAn0VKFgsBUE2QFW6oJ+md++6uC8j1cci2yK03XvLBz+ETycQ6EjlMOiGhXKHiy9mrTe GkzKR1J6VhCDB6AEjqTIxfG7JF27qxVw14rqGKrsBqRcp/k41RIqoeBWxJYD9KUjsprj y7QA== X-Gm-Message-State: AOJu0YxCqsJb/al/O95mncml4ut/iSLXzEQjas+JyxdpEoITwlSh8Jg+ 13RdJbzTM0qqPCpO5NUcYR/cAzPeC9mOC6M1tMoR4fSZy45U2gmlK64QLqsFWu3N4Py1qmdF+p6 M X-Google-Smtp-Source: AGHT+IFRztwwFzuqDMLCKe1HJL0VyN7UZW2IThAYmIBOBL/vYMjon6/glkSd1siXs1SQu1MAzFb96Q== X-Received: by 2002:a05:6402:26c8:b0:5ce:e5be:d042 with SMTP id 4fb4d7f45d1cf-5cefc66ec4amr296655a12.5.1730918780697; Wed, 06 Nov 2024 10:46:20 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Artyom Tarasenko , Stefano Stabellini , Richard Henderson , xen-devel@lists.xenproject.org, Paolo Bonzini , Marcel Apfelbaum , "Edgar E. Iglesias" , Bastian Koppelmann , Anthony PERARD , Eduardo Habkost , Thomas Huth , Jia Liu , Stafford Horne , Paul Durrant , Mark Cave-Ayland , "Michael S. Tsirkin" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 1/5] hw/i386: Mark devices as little-endian Date: Wed, 6 Nov 2024 18:46:08 +0000 Message-ID: <20241106184612.71897-2-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241106184612.71897-1-philmd@linaro.org> References: <20241106184612.71897-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=philmd@linaro.org; helo=mail-ed1-x52f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1730918819945116600 These devices are only used by the X86 targets, which are only built as little-endian. Therefore the DEVICE_NATIVE_ENDIAN definition expand to DEVICE_LITTLE_ENDIAN (besides, the DEVICE_BIG_ENDIAN case isn't tested). Simplify directly using DEVICE_LITTLE_ENDIAN. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- hw/i386/kvm/apic.c | 2 +- hw/i386/pc.c | 4 ++-- hw/i386/vapic.c | 2 +- hw/i386/xen/xen_apic.c | 2 +- hw/i386/xen/xen_platform.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/i386/kvm/apic.c b/hw/i386/kvm/apic.c index a72c28e8a7..3a5d69e8d0 100644 --- a/hw/i386/kvm/apic.c +++ b/hw/i386/kvm/apic.c @@ -214,7 +214,7 @@ static void kvm_apic_mem_write(void *opaque, hwaddr add= r, static const MemoryRegionOps kvm_apic_io_ops =3D { .read =3D kvm_apic_mem_read, .write =3D kvm_apic_mem_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void kvm_apic_reset(APICCommonState *s) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 830614d930..2259589e0d 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1064,7 +1064,7 @@ DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus *pci= _bus) static const MemoryRegionOps ioport80_io_ops =3D { .write =3D ioport80_write, .read =3D ioport80_read, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .impl =3D { .min_access_size =3D 1, .max_access_size =3D 1, @@ -1074,7 +1074,7 @@ static const MemoryRegionOps ioport80_io_ops =3D { static const MemoryRegionOps ioportF0_io_ops =3D { .write =3D ioportF0_write, .read =3D ioportF0_read, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .impl =3D { .min_access_size =3D 1, .max_access_size =3D 1, diff --git a/hw/i386/vapic.c b/hw/i386/vapic.c index ef7f8b967f..fd906fdf78 100644 --- a/hw/i386/vapic.c +++ b/hw/i386/vapic.c @@ -718,7 +718,7 @@ static uint64_t vapic_read(void *opaque, hwaddr addr, u= nsigned size) static const MemoryRegionOps vapic_ops =3D { .write =3D vapic_write, .read =3D vapic_read, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void vapic_realize(DeviceState *dev, Error **errp) diff --git a/hw/i386/xen/xen_apic.c b/hw/i386/xen/xen_apic.c index 101e16a766..a94e9005cb 100644 --- a/hw/i386/xen/xen_apic.c +++ b/hw/i386/xen/xen_apic.c @@ -36,7 +36,7 @@ static void xen_apic_mem_write(void *opaque, hwaddr addr, static const MemoryRegionOps xen_apic_io_ops =3D { .read =3D xen_apic_mem_read, .write =3D xen_apic_mem_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void xen_apic_realize(DeviceState *dev, Error **errp) diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c index ec0e536e85..3b3e745822 100644 --- a/hw/i386/xen/xen_platform.c +++ b/hw/i386/xen/xen_platform.c @@ -514,7 +514,7 @@ static void platform_mmio_write(void *opaque, hwaddr ad= dr, static const MemoryRegionOps platform_mmio_handler =3D { .read =3D &platform_mmio_read, .write =3D &platform_mmio_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void platform_mmio_setup(PCIXenPlatformState *d) --=20 2.45.2 From nobody Sat Nov 23 21:48:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1730918850; cv=none; d=zohomail.com; s=zohoarc; b=ZboSjCKQjDgmevKmSarIHU1kqBSDw5CVa9761Fv5XFV9qs/fdc+5ElhyiEioQFjNZrSqO8fRsEoaDKAiHvA9d1Cflrh7hCMggvxVLjlrGYf7mKUumCzKI0RbSoz+eG0ByYtBWNdesn5c5HgGmwjMs6e423S1oMFYHx112bwNGhY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730918850; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=iNstnbcurcwe9tiYawZfa8Zi088/DUlHFBmK9/a+8zY=; b=g8/n7aNF8GfWJqxDlDT8/simDai0F6OUvKp0xpFhEauxQcAEmlevHs9BZ4V5f7a2jgAwQQFuVVrw2wHNrmOJHNJx6Pil6U+K2h0kYJZiL3ttg4NjQ3UZnkuuId8y2dW/Sqxq15x86GdCBeUuY6wavPZxktjFIGBXTSz77ikBT6k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730918850520805.3244540884494; Wed, 6 Nov 2024 10:47:30 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8l33-0008Q0-Cf; Wed, 06 Nov 2024 13:46:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t8l2y-0008NV-VU for qemu-devel@nongnu.org; Wed, 06 Nov 2024 13:46:29 -0500 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8l2x-0000v9-FD for qemu-devel@nongnu.org; Wed, 06 Nov 2024 13:46:28 -0500 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a9ed0ec0e92so9457266b.0 for ; Wed, 06 Nov 2024 10:46:26 -0800 (PST) Received: from localhost.localdomain ([89.101.134.25]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9eb16d9f96sm318040866b.75.2024.11.06.10.46.24 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 06 Nov 2024 10:46:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730918785; x=1731523585; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iNstnbcurcwe9tiYawZfa8Zi088/DUlHFBmK9/a+8zY=; b=Jjv83wV1lY6IO/4e/sk0GXNxwM4LdIwlGSTgZ1/swRoAAgf584+dX3N2gSqYt0emYr 3cSj6usG7IVGx0yi2VFpbehF2IDJ46/b4SnfeElM7a03Bf32w/MoRifiFgCGv+MZrvR4 gFRJG3fT+mL2BZPlAmB+1m4QY0z3fcN3FRg2T0ng5KgO10HJbc5YUQuBjEj7v85wecSx MBbEKJgYjjk3bcyl+yUyZwbw9C1Xwm0xiKThFPaJve/EjW8HGfhlU8JDCwQQ2tInVpsK XUS4vCZRHgU2s6oCd1HpKyJHnBmCDXhyo6pH7qOJeRkLm4efT7Aqfw9srFExGI5AN+vo CFSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730918785; x=1731523585; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iNstnbcurcwe9tiYawZfa8Zi088/DUlHFBmK9/a+8zY=; b=V0ZQMTS6VbFX/UNNp0RPm93A1saPNk9afj9XaVDrT0XYWxoyHWX/pk1LwpaujJcYM0 T86B3yVDqSVVDr6vN5w58K5XaeLPKhxM6RdgOBVup3Jy3egLXvDwFOb3x8Khtb2eCjwy 8Ock7hWBbUwqH7NqD+bVG95scnOSrYcfiQqZJ54LSD2RKVrG5dNmwUt56gnQjUomTAnh yjj4D8Kxr2QZaFmn9miPkMPWE7ObIvl0xAjxa2Qp4pFlaBEE5O3GAmSMtdZqhQwm7XNo NtpJGJ6fIVE2MOY0Hr79qyxCwZK/9RqiE+i0sduTJ8GEe4yQaI6MQXoxaCsnt51yqNUy IdCA== X-Gm-Message-State: AOJu0YzptxToQG3zfyuZDFB0lwTMSDpF4BysNC6cbAfnKnIUNg7k3yeL ZZKmypkkyO0HDsVdu/d7U42N53JZ2ioLp5F/6bPo6xiTDaTcVImxFA6gfwbTpSaOrtCeZr2sWoz D X-Google-Smtp-Source: AGHT+IGjArD1IMYMRr0Wdsufa3Pz3wV1Bnd8QpL2R9nInPp4yr8/a39mB/pkO2WyFWxS76ZZlJR3WQ== X-Received: by 2002:a17:907:94cb:b0:a9a:835b:fc77 with SMTP id a640c23a62f3a-a9e6549106bmr2239257766b.8.1730918785638; Wed, 06 Nov 2024 10:46:25 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Artyom Tarasenko , Stefano Stabellini , Richard Henderson , xen-devel@lists.xenproject.org, Paolo Bonzini , Marcel Apfelbaum , "Edgar E. Iglesias" , Bastian Koppelmann , Anthony PERARD , Eduardo Habkost , Thomas Huth , Jia Liu , Stafford Horne , Paul Durrant , Mark Cave-Ayland , "Michael S. Tsirkin" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 2/5] hw/tricore: Mark devices as little-endian Date: Wed, 6 Nov 2024 18:46:09 +0000 Message-ID: <20241106184612.71897-3-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241106184612.71897-1-philmd@linaro.org> References: <20241106184612.71897-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=philmd@linaro.org; helo=mail-ej1-x630.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1730918851496116600 These devices are only used by the TriCore target, which is only built as little-endian. Therefore the DEVICE_NATIVE_ENDIAN definition expand to DEVICE_LITTLE_ENDIAN (besides, the DEVICE_BIG_ENDIAN case isn't tested). Simplify directly using DEVICE_LITTLE_ENDIAN. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- hw/tricore/tricore_testdevice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/tricore/tricore_testdevice.c b/hw/tricore/tricore_testdevic= e.c index ae95c49565..169f5907e9 100644 --- a/hw/tricore/tricore_testdevice.c +++ b/hw/tricore/tricore_testdevice.c @@ -47,7 +47,7 @@ static const MemoryRegionOps tricore_testdevice_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 tricore_testdevice_init(Object *obj) --=20 2.45.2 From nobody Sat Nov 23 21:48:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1730918834; cv=none; d=zohomail.com; s=zohoarc; b=U39RYa7gUTG2KR2bA1+ZIwyGCXhUOwTtwMSfoXj1ZGekAk6bqlQHrxfF2QvFDGr6Z9VOlwtklXsQ63+1+tqTyYbuT+iP7598+Guv7LGk4CiBG3IncNPmF6mQsZI4HRSoEApA21uFnGgAx7ZaFCBqtfjOmtNarXFU1JG62bP4N1M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730918834; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=yO3kVmbmcBoFVWzYS+y583sX7R+jYDZcKW8eZMLJiQc=; b=LdBGpsA2mpR63JkTstyM50ntU4ihnlumQFg3KYF8VmTCmsiL45GrTqsNnBnNgEUdnqayVQ64oOgFX5AKzqRBWAX7n7LO8/4rttuRkcHYUItB0Bn5T5TRGI5307tIHAAA63P5ApeeXvWmAnw6nABz64LbESHEHo7WePUfDR9MNk4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730918834345768.4712186419664; Wed, 6 Nov 2024 10:47:14 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8l37-0008SG-SR; Wed, 06 Nov 2024 13:46:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t8l34-0008RJ-E9 for qemu-devel@nongnu.org; Wed, 06 Nov 2024 13:46:35 -0500 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8l32-0000vm-Qa for qemu-devel@nongnu.org; Wed, 06 Nov 2024 13:46:34 -0500 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a99f1fd20c4so11610066b.0 for ; Wed, 06 Nov 2024 10:46:32 -0800 (PST) Received: from localhost.localdomain ([89.101.241.141]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9eb16f8e2csm315523366b.91.2024.11.06.10.46.29 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 06 Nov 2024 10:46:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730918791; x=1731523591; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yO3kVmbmcBoFVWzYS+y583sX7R+jYDZcKW8eZMLJiQc=; b=NgFGhTipH9Q57B0CgUSTZwcisRJrrerO575IRQ8mlU+ITHWkQIBblkurs2owa1VlCN c7mbTYedBooI/RXQTMqdJSgLVnhy/kKDz5Hv9DmdaLGugCtRO9PClSaghVjYk8KwpXiM 4Pd8mbvyj28bVIQ4fD0sRAKZ9GArc9Z/Glp/ACvMlkU2ggHWQe02l1hzjVIsDBITNoGO Lv9cjJ0Tx1lpkbwA6UYK0erdXQSS6YfwkEaDefw1CXuOQRJi+pBG/qgr+vavY/GzwpGe i1x89eTXhHMJu4UZkmbh2wTwYfwWaggabAFUuoB3QwreYmsywVjBxWNuq7I9w/t6Ki7F cv9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730918791; x=1731523591; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yO3kVmbmcBoFVWzYS+y583sX7R+jYDZcKW8eZMLJiQc=; b=sPTQ8fRbMFlPVfy8kftpPbieoRtePU53+hRs/oBL9UYG1QC9Aegm4VxvsSIXrjTyZE C38UibogPsefrffvq0YVv1Lavx6CND4Uyb3XStnEy5YeaVlvjPpUC1ZaC3d/bWbpgvwg Q8z9gGddYWiuWtZJfyosfm3NQKAR/5IK+6R2M/PGVyoymhYeEhhw7Hpv6br+CnMwrwUC lSyW+p7JtYBzxdRh/1+iiwsSMP0gydf8+JU7dOPECAss8SU63tsHND9T2todUQ5UJj5n QRpQOtzMhJe/jR+OjDPzHbe9tw0DYQUhExVh6vVkE8gqZ+n/g1zvW3gOZ5nxJHnkWxhG iSQQ== X-Gm-Message-State: AOJu0YwxWrqVcnhFn3hgqiqimvvie5S2o5RlzKzxdLGxk5crYKA63Y/5 yjNA1fBvNQEKMY0R3CtzHZGAWbeCTsyCFybbS5FtYM7itpASbh+zf0eQmmQG7dH0hWiclACKCtU o X-Google-Smtp-Source: AGHT+IHLwEYzjh7bE7VY6UKu2vqJy3kDHJGLTpvdAYwpwyzxfVfdumNtAIjQKBsxyhavBG7XBennEQ== X-Received: by 2002:a17:907:7ba7:b0:a9a:522a:eddd with SMTP id a640c23a62f3a-a9e5089b4admr2275919566b.11.1730918790907; Wed, 06 Nov 2024 10:46:30 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Artyom Tarasenko , Stefano Stabellini , Richard Henderson , xen-devel@lists.xenproject.org, Paolo Bonzini , Marcel Apfelbaum , "Edgar E. Iglesias" , Bastian Koppelmann , Anthony PERARD , Eduardo Habkost , Thomas Huth , Jia Liu , Stafford Horne , Paul Durrant , Mark Cave-Ayland , "Michael S. Tsirkin" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 3/5] hw/m68k: Mark devices as big-endian Date: Wed, 6 Nov 2024 18:46:10 +0000 Message-ID: <20241106184612.71897-4-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241106184612.71897-1-philmd@linaro.org> References: <20241106184612.71897-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=philmd@linaro.org; helo=mail-ej1-x62f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1730918835587116600 These devices are only used by the M68K target, which is only built as big-endian. Therefore the DEVICE_NATIVE_ENDIAN definition expand to DEVICE_BIG_ENDIAN (besides, the DEVICE_LITTLE_ENDIAN case isn't tested). Simplify directly using DEVICE_BIG_ENDIAN. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- hw/m68k/mcf5206.c | 2 +- hw/m68k/mcf5208.c | 6 +++--- hw/m68k/mcf_intc.c | 2 +- hw/m68k/next-kbd.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/m68k/mcf5206.c b/hw/m68k/mcf5206.c index 7247cdbe5e..4892924fc2 100644 --- a/hw/m68k/mcf5206.c +++ b/hw/m68k/mcf5206.c @@ -582,7 +582,7 @@ static const MemoryRegionOps m5206_mbar_ops =3D { .write =3D m5206_mbar_writefn, .valid.min_access_size =3D 1, .valid.max_access_size =3D 4, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, }; =20 static void mcf5206_mbar_realize(DeviceState *dev, Error **errp) diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c index e37cd50d18..4166877066 100644 --- a/hw/m68k/mcf5208.c +++ b/hw/m68k/mcf5208.c @@ -155,7 +155,7 @@ static uint64_t m5208_timer_read(void *opaque, hwaddr a= ddr, static const MemoryRegionOps m5208_timer_ops =3D { .read =3D m5208_timer_read, .write =3D m5208_timer_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, }; =20 static uint64_t m5208_sys_read(void *opaque, hwaddr addr, @@ -192,7 +192,7 @@ static void m5208_sys_write(void *opaque, hwaddr addr, static const MemoryRegionOps m5208_sys_ops =3D { .read =3D m5208_sys_read, .write =3D m5208_sys_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, }; =20 static uint64_t m5208_rcm_read(void *opaque, hwaddr addr, @@ -224,7 +224,7 @@ static void m5208_rcm_write(void *opaque, hwaddr addr, static const MemoryRegionOps m5208_rcm_ops =3D { .read =3D m5208_rcm_read, .write =3D m5208_rcm_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, }; =20 static void mcf5208_sys_init(MemoryRegion *address_space, qemu_irq *pic, diff --git a/hw/m68k/mcf_intc.c b/hw/m68k/mcf_intc.c index 9fc30b03ba..5f38c49077 100644 --- a/hw/m68k/mcf_intc.c +++ b/hw/m68k/mcf_intc.c @@ -166,7 +166,7 @@ static void mcf_intc_reset(DeviceState *dev) static const MemoryRegionOps mcf_intc_ops =3D { .read =3D mcf_intc_read, .write =3D mcf_intc_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, }; =20 static void mcf_intc_instance_init(Object *obj) diff --git a/hw/m68k/next-kbd.c b/hw/m68k/next-kbd.c index bc67810f31..4d87edc2de 100644 --- a/hw/m68k/next-kbd.c +++ b/hw/m68k/next-kbd.c @@ -163,7 +163,7 @@ static const MemoryRegionOps kbd_ops =3D { .write =3D kbd_writefn, .valid.min_access_size =3D 1, .valid.max_access_size =3D 4, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, }; =20 static void nextkbd_event(void *opaque, int ch) --=20 2.45.2 From nobody Sat Nov 23 21:48:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1730918824; cv=none; d=zohomail.com; s=zohoarc; b=SSXfuy6oHFUI7uqTayoRYfMEv0zLR1mrQWsrtX9nKE+S0GmN9aG7VWQ2lywZC+s5Hxi8yrQOEfQZok5oH0+4bjol/5NiF52m8j5BtX5LK3dITB/iHg1/dB5nLqDEaMGXOvWFakYvmACitGu6lV2HtetZCNBK/pYcx5FHQrOExqw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730918824; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=YsFK2U3XFqb/vEljmH+2siHctjoVhJmmiNdlJHfI0/4=; b=RPBDh8M/IGN384J8kOgcBDBaAqeE/0Fjhahl4ofGQ+6hW3XA+CzkOhLDfGAupiuCBmmZbxqWQicb+zDkn+BBddapzeTv74XLF4Rfz5in2sx4Bg4m7Ta2uiOopEjlSvEiRcSN7pirjOaZFXDmttl2pRE4LpkGB5CbTvY4uM21u5M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1730918824136370.79916842822513; Wed, 6 Nov 2024 10:47:04 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.831306.1246551 (Exim 4.92) (envelope-from ) id 1t8l3A-0002sD-HL; Wed, 06 Nov 2024 18:46:40 +0000 Received: by outflank-mailman (output) from mailman id 831306.1246551; Wed, 06 Nov 2024 18:46:40 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t8l3A-0002s4-D0; Wed, 06 Nov 2024 18:46:40 +0000 Received: by outflank-mailman (input) for mailman id 831306; Wed, 06 Nov 2024 18:46:39 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t8l39-0001q9-Ke for xen-devel@lists.xenproject.org; Wed, 06 Nov 2024 18:46:39 +0000 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [2a00:1450:4864:20::62f]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 7365aef6-9c6f-11ef-99a3-01e77a169b0f; Wed, 06 Nov 2024 19:46:36 +0100 (CET) Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a9acafdb745so35862666b.0 for ; Wed, 06 Nov 2024 10:46:36 -0800 (PST) Received: from localhost.localdomain ([89.101.134.25]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9eb16d9d68sm317330266b.72.2024.11.06.10.46.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 06 Nov 2024 10:46:35 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 7365aef6-9c6f-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo2MmYiLCJoZWxvIjoibWFpbC1lajEteDYyZi5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6IjczNjVhZWY2LTljNmYtMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMwOTE4Nzk2LjQ5NjAwOCwic2VuZGVyIjoicGhpbG1kQGxpbmFyby5vcmciLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730918796; x=1731523596; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YsFK2U3XFqb/vEljmH+2siHctjoVhJmmiNdlJHfI0/4=; b=W/J9lIP6zrElw4Hq74bucweEH1iuYzhVkfIZnGeKvjmhiR637CEOELSdwbQ5ov/FzW XUhrEcp/0eByp4ffvDhX8XpY79dFhu8zwzLcG7ZzFD+TEynWkoC3J/U42YkuXsTQ9klK QCztpol6HIUaPiKFk97spKmU2bX29AVbVwsHrLaMyFBdm3ce3l89LucJP0zNr1F6Qvvy vKipokhQYP4AkczuC6DWCsmxR3SAfRGPgOuKWbRk22raHwL8catbRDmryJi6Z3ewnkl3 9hWby6R00rOi8t3E3Kdf+grGfMkOqSp9PpfSTEvZ4DzVn0uniHNazPBEwZPlyeZPVh5L IBtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730918796; x=1731523596; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YsFK2U3XFqb/vEljmH+2siHctjoVhJmmiNdlJHfI0/4=; b=QtycT7FjhMyvnwCN1HQMyNNiRQXXblxZ8IOezV7m2v8/fJUjnx/01kEdfWp6OS+3Yw 9u0oHl3ySAhZ30nOSfBLKiKFSh6+4/gehHv4jjgwBRw/uQdzJEW10yfjeKD3BK7xufaz MnFlRc1t3IRaZj9CvL+uwSvuvDd2YL1WQpC1sdMcSyXkSBnAJX+ND6G4RikzMjgMwZ9A sneQ7EJ5k4xGm+xEg71XykFJzT5HaRGOBT+hr5eS2lfDeIWjRZCDW70G6BHwZh9kbTmh DpPKfSKw9AVjDbz/VXquJMEesOzhtgJUIP9b7eY8KFKMbH8xuc67tZSK/5bqC3sBTWDk LoNA== X-Forwarded-Encrypted: i=1; AJvYcCUjHSc1O/tm83TUcbpyIDRMzboflgJ/e+gNL6+BwhZOFff+J5YmPC6zdMOCzxefFHsA1LHFZzyZCLo=@lists.xenproject.org X-Gm-Message-State: AOJu0YwT5qLqg1Rf/SqDQI38huvA47Gr44/KDtQdpur4D+6i57JIEvQJ wr2W9jrzpNew5OB7xleZM6vd0JAyuFhjvXLJ8cod87GPvjoedBsKaMOsYU1pmfE= X-Google-Smtp-Source: AGHT+IE+L+yQyHT39fSRf4/OhKcpAqJYHinN1o/h9Nj2ZuOUgW78Lq2jC2oQuBoUyZL+R29YcaV+GA== X-Received: by 2002:a17:907:7f90:b0:a9e:670f:9485 with SMTP id a640c23a62f3a-a9ed51c6ed6mr17121666b.30.1730918795914; Wed, 06 Nov 2024 10:46:35 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Artyom Tarasenko , Stefano Stabellini , Richard Henderson , xen-devel@lists.xenproject.org, Paolo Bonzini , Marcel Apfelbaum , "Edgar E. Iglesias" , Bastian Koppelmann , Anthony PERARD , Eduardo Habkost , Thomas Huth , Jia Liu , Stafford Horne , Paul Durrant , Mark Cave-Ayland , "Michael S. Tsirkin" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 4/5] hw/openrisc: Mark devices as big-endian Date: Wed, 6 Nov 2024 18:46:11 +0000 Message-ID: <20241106184612.71897-5-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241106184612.71897-1-philmd@linaro.org> References: <20241106184612.71897-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1730918825233116600 These devices are only used by the OpenRISC target, which is only built as big-endian. Therefore the DEVICE_NATIVE_ENDIAN definition expand to DEVICE_BIG_ENDIAN (besides, the DEVICE_LITTLE_ENDIAN case isn't tested). Simplify directly using DEVICE_BIG_ENDIAN. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- hw/openrisc/openrisc_sim.c | 2 +- hw/openrisc/virt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c index 9fb63515ef..794c175bdb 100644 --- a/hw/openrisc/openrisc_sim.c +++ b/hw/openrisc/openrisc_sim.c @@ -266,7 +266,7 @@ static void openrisc_sim_serial_init(Or1ksimState *stat= e, hwaddr base, } serial_mm_init(get_system_memory(), base, 0, serial_irq, 115200, serial_hd(OR1KSIM_UART_COUNT - uart_idx - 1), - DEVICE_NATIVE_ENDIAN); + DEVICE_BIG_ENDIAN); =20 /* Add device tree node for serial. */ nodename =3D g_strdup_printf("/serial@%" HWADDR_PRIx, base); diff --git a/hw/openrisc/virt.c b/hw/openrisc/virt.c index 47d2c9bd3c..ede57fe391 100644 --- a/hw/openrisc/virt.c +++ b/hw/openrisc/virt.c @@ -236,7 +236,7 @@ static void openrisc_virt_serial_init(OR1KVirtState *st= ate, hwaddr base, qemu_irq serial_irq =3D get_per_cpu_irq(cpus, num_cpus, irq_pin); =20 serial_mm_init(get_system_memory(), base, 0, serial_irq, 115200, - serial_hd(0), DEVICE_NATIVE_ENDIAN); + serial_hd(0), DEVICE_BIG_ENDIAN); =20 /* Add device tree node for serial. */ nodename =3D g_strdup_printf("/serial@%" HWADDR_PRIx, base); --=20 2.45.2 From nobody Sat Nov 23 21:48:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1730918829; cv=none; d=zohomail.com; s=zohoarc; b=MhnfxEw2DR56+amZgyeplFnm9vzL9FPCVvZCyvMBiWGIrlnRm9C4Ci/60IXncSLm9mLNqOULgdHLB++rbACk27kzhhGJO006nXOGEPeEO9n8F8fZpwjbkouswzwpT7ZzpX9TOuMO7W/GaqeOpES6Wb/ZWH3P2K0Pms2tx+fmS8Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730918829; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=MkGkfKVgrldMieE36JppEsQQQbpaD8YlgbmPxpDRAVA=; b=FAFldKskRrRT7CLer16V3X4eM8Oi2yqikOzHUiaM1bCCiNlg2eMdAa0ntfgr/q6UgSdPZvVbwnMEaMeIbfAwwyeH1PyMeARGeKIMcuNCY2kXFkzH+Cy0s7XrPvrK58qVOVw+reI5zn0C9IVwJbtRffUDD7nZj4zHnlgL+oRmTH4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 173091882924514.99892352535278; Wed, 6 Nov 2024 10:47:09 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.831310.1246561 (Exim 4.92) (envelope-from ) id 1t8l3F-0003JH-SR; Wed, 06 Nov 2024 18:46:45 +0000 Received: by outflank-mailman (output) from mailman id 831310.1246561; Wed, 06 Nov 2024 18:46:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t8l3F-0003J5-P8; Wed, 06 Nov 2024 18:46:45 +0000 Received: by outflank-mailman (input) for mailman id 831310; Wed, 06 Nov 2024 18:46:44 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t8l3E-0001q9-LQ for xen-devel@lists.xenproject.org; Wed, 06 Nov 2024 18:46:44 +0000 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [2a00:1450:4864:20::12e]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 7676c029-9c6f-11ef-99a3-01e77a169b0f; Wed, 06 Nov 2024 19:46:41 +0100 (CET) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-53a097aa3daso33057e87.1 for ; Wed, 06 Nov 2024 10:46:41 -0800 (PST) Received: from localhost.localdomain ([89.101.134.25]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9eb16a7dc6sm314521266b.7.2024.11.06.10.46.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 06 Nov 2024 10:46:40 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 7676c029-9c6f-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjoxMmUiLCJoZWxvIjoibWFpbC1sZjEteDEyZS5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6Ijc2NzZjMDI5LTljNmYtMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMwOTE4ODAxLjU3MzQzOCwic2VuZGVyIjoicGhpbG1kQGxpbmFyby5vcmciLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730918801; x=1731523601; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MkGkfKVgrldMieE36JppEsQQQbpaD8YlgbmPxpDRAVA=; b=EOmEPHvSv1wcVQwCWiWpG7S6c3OlvR54obZp1jOR63EAZ9qDnE1DnKmW2QKC8tJ/mV 1FPVnMadyv/cWy94mNDAS03yzb34OtrWUkueDzVFwcrTlFqg5rwtawICgEwOMA+J7bS/ ThUogKEVzUxXkdPY8zwBOh9UBrsQWNkz9XyL/wumycnr5VLzV94iwifRBraoKU0PPPSz uShXBolxIp4EIYxFeivGx4Ky8NVy5vuT3/Vfk8KDpZYZAHi/7qV9p+ZGW/IOuwzP8JrR Zs+pgw+LXCz+ek6scG2Iq0LLJOxIUYZlF45AruQuH4dtmfFzgn7fsmxEpSRycoremOI+ CHJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730918801; x=1731523601; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MkGkfKVgrldMieE36JppEsQQQbpaD8YlgbmPxpDRAVA=; b=XKXdnKSrUOM2u8X5iLKI6rJtKMq0JBO+ou3rNCRjL1fqNcur/5pCP00ZT2Eb18tu3T HeIJbqNguBWud+9jQCIWeorqe72fSwQP1fIfqlasI1+G8AG/4/I+o5hDVrmDpCeCylXS lGfDzW8zSMkCbEeMCLIAPCGg+fXkQ8+j7Zq4n34GICOtWNydy+4IqtiGrN8qBE59SDaO nx173I90HGAQVKYuJRZAgCg5mn2GAVpNdJ5+MwDQlJOo4wVgN7IaGfuJ4cYY/7ydFvOj /VLufE58aZKYiINj8U4Ixx6sGdMU3u+dM4h7QPsDADKIqCMJXHcgyJvrlgPRMgVNj7ar hJjQ== X-Forwarded-Encrypted: i=1; AJvYcCUXdqOc4XdCAnKiFY2RZW0UIPB5ugRrgM4qc9EYCDix1ltQWttrsStfl5C84t/kiFubHpjg5hBWc3w=@lists.xenproject.org X-Gm-Message-State: AOJu0YxaWfJd73Jf6xUNayatKNV6QcqQV/XT77PSWv95qid8Fr7DMlbq cXIJfvNM7VfxIswJNJARrc1XTayM4qgBs3zuBBz3ENn3XxCpc/49Rvn4jZY1B5g= X-Google-Smtp-Source: AGHT+IGZ7yhvC/Wx3siWVWtSGdKVwGW9oG3YHsndXh771V6dpEgTCitAC2JnhInj+huJT/sEjeTvSw== X-Received: by 2002:a05:6512:3c96:b0:530:aa09:b6bf with SMTP id 2adb3069b0e04-53d65df7628mr10283658e87.24.1730918800919; Wed, 06 Nov 2024 10:46:40 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Artyom Tarasenko , Stefano Stabellini , Richard Henderson , xen-devel@lists.xenproject.org, Paolo Bonzini , Marcel Apfelbaum , "Edgar E. Iglesias" , Bastian Koppelmann , Anthony PERARD , Eduardo Habkost , Thomas Huth , Jia Liu , Stafford Horne , Paul Durrant , Mark Cave-Ayland , "Michael S. Tsirkin" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 5/5] hw/sparc: Mark devices as big-endian Date: Wed, 6 Nov 2024 18:46:12 +0000 Message-ID: <20241106184612.71897-6-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241106184612.71897-1-philmd@linaro.org> References: <20241106184612.71897-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1730918831205116600 These devices are only used by the SPARC targets, which are only built as big-endian. Therefore the DEVICE_NATIVE_ENDIAN definition expand to DEVICE_BIG_ENDIAN (besides, the DEVICE_LITTLE_ENDIAN case isn't tested). Simplify directly using DEVICE_BIG_ENDIAN. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Mark Cave-Ayland Reviewed-by: Richard Henderson --- hw/sparc/sun4m_iommu.c | 2 +- hw/sparc64/sun4u.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/sparc/sun4m_iommu.c b/hw/sparc/sun4m_iommu.c index 6f765e97e4..4486508e3b 100644 --- a/hw/sparc/sun4m_iommu.c +++ b/hw/sparc/sun4m_iommu.c @@ -238,7 +238,7 @@ static void iommu_mem_write(void *opaque, hwaddr addr, static const MemoryRegionOps iommu_mem_ops =3D { .read =3D iommu_mem_read, .write =3D iommu_mem_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/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 541c7f74fa..9d7aebf632 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -254,7 +254,7 @@ static void power_mem_write(void *opaque, hwaddr addr, static const MemoryRegionOps power_mem_ops =3D { .read =3D power_mem_read, .write =3D power_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.45.2