From patchwork Wed Nov 6 18:46:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 13865250 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C4017D59F60 for ; Wed, 6 Nov 2024 18:47:18 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8l3A-00008x-SM; Wed, 06 Nov 2024 13:46:40 -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 1t8l39-0008Sb-N4 for qemu-devel@nongnu.org; Wed, 06 Nov 2024 13:46:39 -0500 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8l37-0000wM-So for qemu-devel@nongnu.org; Wed, 06 Nov 2024 13:46:39 -0500 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a9acafdb745so35863766b.0 for ; Wed, 06 Nov 2024 10:46:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730918796; x=1731523596; 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=YsFK2U3XFqb/vEljmH+2siHctjoVhJmmiNdlJHfI0/4=; b=hQ3ZYRKeM9RAz5rhZfvn6iN87PgTvsn886yZGBDiHPXycfDLPXac9nom/2TlwaY8w7 H2hQIDgE19jHgXGirJBejG/SocHvYHya80hAZKTpn/YDCOkm4VExxbI49SBKAiVTNahe rVD6haCZiKt7IKVeTibTlCOK1kZS/haq4mdUiEwWxvnNiof4bmgZesYSMuh0d4/G4DKS MvI0T2KWc5YxLWV4qauxcX/nT/fuYD3kD6krs7khZDb8CuuHbdcoo/HC9e7SGdZMOhzw zA2TzNGM7G/s3sdMsl8d7WvXRoyMq4SVJw82Xk93iab5LNaNLfOv76AgUAj06psASqUa pRvw== 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=n4JP25EBpM7gCtsOzDvxj72LTiA6LRjgcxpVUOaSJQiy8fWA1PePpurGlKnt5Tcuc1 yk0xN2duRcMR/Tu4vQbIKeKdDdxMKPqLHWwU8vttWvGFqC7i1wRyHtX6bWoDEdEaIuIZ nOnmrjW8qDRlLQvjApzffjVvBLHuLsudOL0Gi1jkJYaHCChVrT2O8WkGQPskfJpxEL7O 8DEp0LdiuA4cNKlBkP9mOHSBDjl7NxB+gKWqPB8rFQMUwxfXq2BXZePHwPAUhP8rwf+t 5wKg10TjFD+YEF/6v+vqZfVSqnyVO97RohtpKNRq/iIRIAmJbUQ9pvOzzNe8hqHS8T34 n7XA== X-Gm-Message-State: AOJu0YwHpwHvKj5vYXsVfSk+uwGRaM6P5Ye/LaDjXmX91Q+7/YuIGddL 0Rhs+cNpQQh8RHMtQkGACO7uIjkvtLT7fD6vSaumbX7LyBkts3mdtsyHfrWN6fvNBzs4DS6OZTD R 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) 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) From: =?utf-8?q?Philippe_Mathieu-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_Mathieu-Daud?= =?utf-8?q?=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 Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=philmd@linaro.org; helo=mail-ej1-x62c.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org 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é --- 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 *state, 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); /* Add device tree node for serial. */ nodename = 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 *state, hwaddr base, qemu_irq serial_irq = get_per_cpu_irq(cpus, num_cpus, irq_pin); serial_mm_init(get_system_memory(), base, 0, serial_irq, 115200, - serial_hd(0), DEVICE_NATIVE_ENDIAN); + serial_hd(0), DEVICE_BIG_ENDIAN); /* Add device tree node for serial. */ nodename = g_strdup_printf("/serial@%" HWADDR_PRIx, base);