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: 841072 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp685942wru; Wed, 6 Nov 2024 10:47:18 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVRkiDljls+0rQfEFAUOzm015F0EKsqYKQqgEBA7jHcoJcCDUQSBtOmy+5VeKbrHnEkx8WeDQ==@linaro.org X-Google-Smtp-Source: AGHT+IGlfwVzdywcxVOVxB417PxTWORJaHm8cf7QEHtdu0MZO0hdEfds+aVLg8AigM1jt6rf0nic X-Received: by 2002:ad4:5aab:0:b0:6cc:819:5075 with SMTP id 6a1803df08f44-6d393c728ddmr5220866d6.18.1730918838626; Wed, 06 Nov 2024 10:47:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1730918838; cv=none; d=google.com; s=arc-20240605; b=gFc0Y+Xd6iwDiRrl+6l0UtdeC58wNABODdnkEx71fRsJWsYuTTUcpYHsPUMhqgXkqQ 8fOnDJ/I4bMC0Sg9UG6eWtDGd2Qna54RfVE5hjeEUkBLyp3BoKJKyVRkpz58iCnPQ621 SmyMVQdbIICpCEhKDX5tqQ4+wDAHVOfoz9FwpRjVFrhx13bffgCsVkpuWEnUEei8EOk/ T66ExnKcvONavc/61e9vC3QyA1ghGoB9GMP7a+9w0IrPCwpFOp6ewqrlRL812+qySvk0 votAKdJVxTRJvO3mt6fcLfTRGQoO7kWiAC6WhFQyZOS3YPo7EmA0hmYtmbgZ5/+50iKS g6hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YsFK2U3XFqb/vEljmH+2siHctjoVhJmmiNdlJHfI0/4=; fh=jDhTT5t6/SNd3Lmy0g3KlPwh8+DK1Bwi2jXD8rwBeIY=; b=EmVtOzQrAwonGK0qA692RTbW6GrzWi7UgSLFpzrN9AGoWXSGRWru7TyeR1bnvl0qKo KdtPw11V9Q88icZcm9iLj1s/+y9SMD7JzEaHpLbzxd/vnaCaB6KiGl5aSDsuSKxr8CN6 tgGWA3r+ZCtkUBKoy5e9b2mUA29Fn9+rOvvrVs3sYNX2p/mvW0gJ4pk5TY6p/2XRrlz3 XxZc9cU4GkQgrPH5h8WQL2okq4FLYmPOUEyqwGjB8OBRc0l1x20wG4U2K8x6hG7lIYH7 SQRTWRJiWWwV5nFB3Z/axUMh/aS1NkZHEkPeJ1ZAlg8OJJzcj4BGJx4lPmVCyS786ee2 nFqg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hQ3ZYRKe; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6d353fa9f9csi161291216d6.31.2024.11.06.10.47.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Nov 2024 10:47:18 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hQ3ZYRKe; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org 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-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.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é 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 *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);