From patchwork Wed Feb 12 11:39:37 2025 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: 864449 Delivered-To: patch@linaro.org Received: by 2002:a5d:4cc5:0:b0:38f:210b:807b with SMTP id c5csp72590wrt; Wed, 12 Feb 2025 03:41:56 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVGRnIzloIdJszoY8AcJkkBZJzYMHpg56+746xZDCK0Us/JpfzEtD+aMSIa6BPn2GAdCRgzbQ==@linaro.org X-Google-Smtp-Source: AGHT+IFc35MZ6yegEhtRhj7/chGlqxFNJkWywzvcwQpQYnpfPnWamqTlF63t8c7dZEb+9CDzrzG/ X-Received: by 2002:a05:6000:1862:b0:38c:5e03:5bb with SMTP id ffacd0b85a97d-38dea2d07bcmr2629347f8f.41.1739360516032; Wed, 12 Feb 2025 03:41:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1739360516; cv=none; d=google.com; s=arc-20240605; b=OTSiWvCtz2ZYX8y/TLi6iaTjIAY8lZkNA2tKyb9U+/mct7NL2sDLrG+ANg3njPHCib 4zZ2D7Dq1NDbdYm5FYadot09xx0spUaUW6dbqUMW2bZq+HaqrnQnOX17XZZNvILVty9g TBV2FtkPnM9YWrf4xihyC+/OpkJDmZf7qtcKwmBNgqWeQsziZCqaQwE/Od1+KmLqRGba PKXh65Wj1EMRXATlv+j++ky4tmDCKC27uq4DeSPDbWBTtmr7iLNBRh5x/qOfieVYTFRr nOWJhV0sj52cbwMz5+5MldiH/UM9Zvp+r0IRuOZuod0hhVJ1fPy43NxMJMyUKWiO5ES/ ZnMA== 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=vSBsnGlk959thSozzz+sJPLc7aQCOLFJmGFeqcx443k=; fh=vD7qhQ7cZX19KLZAcmtT05o0qXFeHyljVeBJb5qxcok=; b=ESqn1vjYTWlblWjTzn3QBp5njrse5KlntBh9hJsnp7Q/5UvQT2McabgxyB6whm+FV+ SvV1kP2CJEzgjVo0FA0w3lP6MSVnVFtKOY/ahQlbUjCH8WvPpxi40xpyAqy4FMsh4zMZ MYPExcLPkTdr/KCoC2wH6WnOxH81co7Xgntgd/vrzwSlw8eE85q5E+1fb7+2cdjrjpXV RnhTdZWomunU++ug2ZlCzj9wUIZVuTBXsgfGR0oSMJCm7yV8cE38D4/M5msS/bZuofop yuBkEyXZRWq3eepdGVdLltJgXDgwpNxAM690OYHbWjipkOum9Zr/WO62uIqizVZYBKNf bf9g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hpcMi23s; 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 ffacd0b85a97d-38f204285absi417912f8f.632.2025.02.12.03.41.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Feb 2025 03:41:56 -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=hpcMi23s; 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 1tiB6H-0002Qz-S3; Wed, 12 Feb 2025 06:40:18 -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 1tiB6A-0002OI-C6 for qemu-devel@nongnu.org; Wed, 12 Feb 2025 06:40:10 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tiB62-0000o2-Pn for qemu-devel@nongnu.org; Wed, 12 Feb 2025 06:40:10 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-43944181e68so35920415e9.0 for ; Wed, 12 Feb 2025 03:40:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739360400; x=1739965200; 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=vSBsnGlk959thSozzz+sJPLc7aQCOLFJmGFeqcx443k=; b=hpcMi23suxG4FrX4wOWXSuiP8ZVnC4NZTDaGGOlBGfcvbfyP+43EWwUhpPZ7DCiNoN 3bNRMUxhCDHKN0t0kpBc9kGFGAjvEV3mJ1v4pZMP9bs8ASkFzeEMXWMGEVZ6pJ3a/Fjq tJMdaSDwsTuujvvRz8cgoHFnC67rIruEI7IMJEgbazrWzGncGmpTRCmqCnZlESB87Wtv BOefD+rCEhSu61B+34KyVwSPTOsm5eoIHamuLfJavVBuvFkLwA2SdGeVjFoEX8agJrHS zXSHGgTX09c89mL7cUzy/nYc0w2FW2e9Wm+RgGwksMjk1AZchxp7WwJDZ/ZGeG4e+UVw fb6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739360400; x=1739965200; 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=vSBsnGlk959thSozzz+sJPLc7aQCOLFJmGFeqcx443k=; b=KJqW7Lh6oTNz2iFz0FuCUQYN72KKjh7ROdKHjQ4g1gfMMWKXzT1KfrRxMfZO/Yb1/B MEBbxRprkmST/LKW0km26O1ugBmSN28yixKrwIJuPwDrtuGDkVd6BG31w4o1bCiiK4h6 dBL2UoE4Po2wi0hDgYB5+a5GGmsXcguw9BU9h9map3RwbamusKO16aZMfxpQb2TZa5RI +osGPJ2V9bzPVTb8/LuLNMtCAG0cvXKK89EnpkMt20EoDZwUSbzMqQN7gEu+xHN8eXpQ Nd0EiLE12p/hs0+cDUZSkc9msVCF9RCX0+QumbJOdXnhv7uqUPY05msWDdOlEZ4CkfVK Bt6g== X-Gm-Message-State: AOJu0YzfG9NP/MNp8f6aNGtAIVec21BOX9vcjLfnIu+HJzU1pNKbr5Tk zyhJYVG7mC1d3OnW2rRVwNfH4/Ltzjy0xtEXcz+OP9vPDE4NI1pLVIW1C2958rQJetLa2t4G5lx n1Ww= X-Gm-Gg: ASbGncu2seWs5mOMYylnnuCrmSxXOWJoyv+cpqp3AUpNRXzI3UfnCFu7/z1Ag4/oQWW Br46qzueViIofplAWbhrrv/jlaZyUmVwaZ7PW9DiKjzgYgmqXEtSeTylMcoPDoYHzYIUHdYq+WY egC0IfK3QXloWxvO6C0vZsvx+MOrIgAcLjyYlNt/rMfO/H83lWcD9QEiwgSwBhcdmcxVzEEFZXG an5E/PNF8YOu+V/hCWbPX8CWSvpObyYKtxnIJVd9t+haKzIKoBAtOBprRLV1pQMIoVoMO+Di98r avlSk3TpzQGZVgJio62fgxrjTThWiFVKQ0X7F5sUI3L51sDuRPj2lMcpipeP4/U30g== X-Received: by 2002:a05:600c:46ce:b0:434:f4fa:83c4 with SMTP id 5b1f17b1804b1-439581cb901mr28046955e9.29.1739360399833; Wed, 12 Feb 2025 03:39:59 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38dcf416619sm13810127f8f.38.2025.02.12.03.39.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 12 Feb 2025 03:39:59 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paul Burton , Jiaxun Yang , Huacai Chen , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Aleksandar Rikalo , Sunil Muthuswamy , Peter Maydell , Beniamino Galvani , Strahinja Jankovic , Alistair Francis , Jason Wang , Niek Linnenbank Subject: [PATCH 4/5] hw/pci-host: Mark versatile regions as little-endian Date: Wed, 12 Feb 2025 12:39:37 +0100 Message-ID: <20250212113938.38692-5-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250212113938.38692-1-philmd@linaro.org> References: <20250212113938.38692-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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=unavailable 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 This device is only used by the ARM 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é Reviewed-by: Richard Henderson --- hw/pci-host/versatile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pci-host/versatile.c b/hw/pci-host/versatile.c index c3fbf4cbf94..33a8ceb3b54 100644 --- a/hw/pci-host/versatile.c +++ b/hw/pci-host/versatile.c @@ -246,7 +246,7 @@ static uint64_t pci_vpb_reg_read(void *opaque, hwaddr addr, static const MemoryRegionOps pci_vpb_reg_ops = { .read = pci_vpb_reg_read, .write = pci_vpb_reg_write, - .endianness = DEVICE_NATIVE_ENDIAN, + .endianness = DEVICE_LITTLE_ENDIAN, .valid = { .min_access_size = 4, .max_access_size = 4, @@ -312,7 +312,7 @@ static uint64_t pci_vpb_config_read(void *opaque, hwaddr addr, static const MemoryRegionOps pci_vpb_config_ops = { .read = pci_vpb_config_read, .write = pci_vpb_config_write, - .endianness = DEVICE_NATIVE_ENDIAN, + .endianness = DEVICE_LITTLE_ENDIAN, }; static int pci_vpb_map_irq(PCIDevice *d, int irq_num)