From patchwork Mon Sep 30 12:53:20 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: 831563 Delivered-To: patch@linaro.org Received: by 2002:a5d:66c8:0:b0:367:895a:4699 with SMTP id k8csp1931211wrw; Mon, 30 Sep 2024 05:54:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVaS9HqLpYFSfFGg5fnydpK7Tz0RbZNeiRro4m/j2qa93CxkeIDUJXmwvUBs3HuzSEa5scgzA==@linaro.org X-Google-Smtp-Source: AGHT+IFL6cENNFmlr6/mWJ+FUWddX2OVxceZMcRsdbXOusPTRnlhNf12o3XEqt589yo/gZHH9FxD X-Received: by 2002:a05:620a:2492:b0:7a9:c406:eebd with SMTP id af79cd13be357-7ae378c28fdmr1664108285a.42.1727700868136; Mon, 30 Sep 2024 05:54:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727700868; cv=none; d=google.com; s=arc-20240605; b=VXghcc2zy6KIytYjPiuWOx8hRUJNmfy7xWgy3C9XbHPStm5r8YPxriCZMx4SrhMrp7 D3jwftkafNm8ZcrboT5xxVHXZsmG86UYbXg9cKrkZnsn6jFwDmi3aQ50Y8AanWDOIB67 E4RUWRwcxa3nRQe2A7qUX8GxkTvoBeiIhIlExOm3mC6PpXg6e6mnwymG0pVQsTFPQejh jUD4SywvqyaMVthaj4jPvixHvfcr5Zw3/G47LywevQr/CmySHDF76J14hmblSuuK9Qdb An9pl52D9vA+n03oPi7muz7AFYYrHS598WoAQWbvI2Px0ZNePwBpfdZGgv3ZQossWe7m zYjQ== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=UpOp8oGufmY3S6ihnzDOSjknSoy4QyFyqBbpPmz4V9I=; fh=pIsvA++wNM3zvLRbteUQL1gnhGeE5D3wPSdvzpAWEQQ=; b=e2Eoz4IYD38F3JbFaTV6nKI1NEMaU2pqNf3BgMY9c3VtO3z9Npirls5LcbATWos0fo aV1rMXJxN6G7XR6OJMuvmXYrjzYv7o0xmeLMFkSZwSo3LwkZFexdVQixaJ/MNSdP06K/ 4KzJpZCcNqH9gzKdSOwHgaJ1b7A8jtVv5+Ze5aXMoRGVnwhppjE3ej5vjAxy1q8OTYU/ 7isxKb5OjrjWGRG2MA5r0T01Gd8JygYV7qOOcfrn5QlL6FeuGigf07sSbv6STv7mWTbA YuM/KqePEXiB9Lx0sz9qFsmgBV89NRJIHyu9BQAS3BL8U1kz1z8wAmGDPzMb3uhj1n+M yv4w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hdjjrsrO; 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 af79cd13be357-7ae37852a5bsi861332685a.400.2024.09.30.05.54.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Sep 2024 05:54:28 -0700 (PDT) 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=hdjjrsrO; 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 1svFu7-00075p-Uo; Mon, 30 Sep 2024 08:53:31 -0400 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 1svFu5-0006wK-D3 for qemu-devel@nongnu.org; Mon, 30 Sep 2024 08:53:29 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1svFu3-0006Vv-Nt for qemu-devel@nongnu.org; Mon, 30 Sep 2024 08:53:29 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-37cdbdbbb1cso1238566f8f.3 for ; Mon, 30 Sep 2024 05:53:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1727700806; x=1728305606; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=UpOp8oGufmY3S6ihnzDOSjknSoy4QyFyqBbpPmz4V9I=; b=hdjjrsrOwM3I71Fu8IIzA/q4m7WZttX4Vpa0YSPVHb+tUSeOGIEhWleUPW7VRJrTaj bQL0A7w9qC9SvXa8DrtB5P240lgRfCbRBpyd/vQGxkOljvDjTYJvaaIWADwzRgmkUODT cCeXiwqu17+QdbROPjO3tLAiY0w3n4keeB4zYF70NR5DYlLFEIX6BtEcDhy6+fuKuRvJ F7wKm2da7CaTM7I//kIj3dn/feAht56JidpJwSL1qY3YfyNrcX2U5v3cOgglnAxdQP4z iuQPlGlJD+fAIY5OvvVg6vOnLZfAFf0i6fdcjBHF6yYvOnbBj65QXsyOh3jGZa8iT02N qzpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727700806; x=1728305606; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UpOp8oGufmY3S6ihnzDOSjknSoy4QyFyqBbpPmz4V9I=; b=vlHAEGI5GKI1c6ros5JCjklKiTeRo1U5R0OTGAzLQrXZF1BRo9ihWiu4QxbuptpJhE N16ibn9jTFNeo2HNYgYwRpZyOdPNzYKjlinMdvPkMyzoiNJtAFVVBtiwNUTeaE+/6/hH qin5N9pftpBtBb04s8IyjELKvZwLD9MgePvySzaQOex4GG6RHJlkBNlbqOmjaVU59/m7 oRfD5IkDG9LrZHkijfooXND4gKpDdVgTwmR6CXbEbncH0kgsFp4TLDOx/Zf+jBJPPxtD rhOJtPurriWonTVeCU4rrlQPie6JBfZXR8TCCHB4ZNyX6aSr1MKgS6L/sq6nd2MsiPAy O2ig== X-Gm-Message-State: AOJu0Yx/QK6G5kxOMKBljagBY9EUt+h98b7QivxmtgxLV4CoNArs22XE 2LN3cnRmwytzfGv1ER2g3mPCci2WEx1mlgR3GT15gkI//UlJA69HusK+Ma93EqQnOvStTAZmbiK WVY8= X-Received: by 2002:a5d:6749:0:b0:374:c4e2:3ca7 with SMTP id ffacd0b85a97d-37cd5a62bf7mr6856121f8f.5.1727700805796; Mon, 30 Sep 2024 05:53:25 -0700 (PDT) Received: from localhost.localdomain ([78.196.4.158]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42e90cd8c5asm179023635e9.1.2024.09.30.05.53.24 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 30 Sep 2024 05:53:25 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Daniel Henrique Barboza , BALATON Zoltan , Nicholas Piggin , "Edgar E. Iglesias" , qemu-ppc@nongnu.org, Anton Johansson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 0/3] hw/ppc: Replace tswap32() by stl_endian_p() Date: Mon, 30 Sep 2024 14:53:20 +0200 Message-ID: <20240930125323.54671-1-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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 Expose ppc_cpu_is_big_endian(), then use it calling the target agnostic stl_endian_p() method, removing the use of the target specific tswap32() method. Philippe Mathieu-Daudé (3): target/ppc: Expose ppc_cpu_is_big_endian() prototype in 'cpu.h' hw/ppc/sam460ex: Replace tswap32() by stl_endian_p() hw/ppc/virtex_ml507: Replace tswap32() by stl_endian_p() target/ppc/cpu.h | 2 ++ hw/ppc/sam460ex.c | 5 +++-- hw/ppc/virtex_ml507.c | 2 +- target/ppc/cpu_init.c | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-)