From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from flow4-smtp.messagingengine.com (flow4-smtp.messagingengine.com [103.168.172.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07A7C25634; Thu, 18 Jul 2024 09:35:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.139 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721295359; cv=none; b=H49Xl9N8IqOGvSxAycuczBGf8RtrTNYZhVPqEdyoV2Q1qo9Y27asfvTd8UOGllGNPKHwM+lk/0eo1fr82323CAOKRqFQVrifEtPvJA38NWaJimMynnns9v5bYHM4Ncn0KUgAkFhFyX/Uo2N7rpE43/17NwH8rQPE/hB1OnCZ4Qw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721295359; c=relaxed/simple; bh=pSQ976eQYW5rH1Dwdz8iHxLbSbZIasTSAP2Pi//gvd8=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=ICI/lgMULOOkuISFGfzykAghHilBUGBeHc/xj+4dEIJGeTWclnyB6ySl9QDZFw3H3VWi8WobhfBCC4viykgasIbOsZLz/+pHrhByda1vB9BJ4XgPwP7Gp3DGGWEkGd6nWmBSi8gYp8rHZhsAerAsvAbyoGdbXqwiRyPUz80g5NI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=gU4B0fXC; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=YqCwNVUW; arc=none smtp.client-ip=103.168.172.139 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="gU4B0fXC"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="YqCwNVUW" Received: from compute8.internal (compute8.nyi.internal [10.202.2.227]) by mailflow.nyi.internal (Postfix) with ESMTP id C6660200379; Thu, 18 Jul 2024 05:35:55 -0400 (EDT) Received: from wimap26 ([10.202.2.86]) by compute8.internal (MEProxy); Thu, 18 Jul 2024 05:35:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1721295355; x=1721302555; bh=N6nNE9JphcqfhA9xYmwmZhMShW3TQ025Yd0UOM/gNrs=; b= gU4B0fXCqkX23adCeJk85Axa5jUwIyl2PAu5Ak58NhKTY5MGrxcxHywaBGqjlaGB EHsmg/15YoGQfdmZCYVXT+LjUEdSD0uzfnnd5L5TbEG5Dhu+w0ZOVwK2HlMoAlCI j8KXiOBnjIj2EeW9VRecxF8+AeBiM1JW7reYXEc+/zkwWcl4uB1vB3uJkEEWVkiR 1IrFONzrwTmHIic+SnrFRljnryEgjhlferPDCLuxNkIOEVMoSZll3T4YpenCZN1W NmHG9cdqmsX9jyksmjDXS4sLQXMnkHU7Pn8Cuyq2UK2R3G2omcVxTpdZ3vitrwuN QuU2zVwT9e5Je1uubi5v8g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1721295355; x= 1721302555; bh=N6nNE9JphcqfhA9xYmwmZhMShW3TQ025Yd0UOM/gNrs=; b=Y qCwNVUWArrKsuH3XSXEL2at8TMuVuiHdG97DnqrCWM5CsyjiTDjYeWySKzCM9a5X c6QinnvARAcLFd9hZoPUtGyw9+/LI3lIq6Qbe48MRe7dNQljWbQMes+JIfYvvo7m oYJIBfsRNqGhzu911wZlNVVbLtMd4Kn4Xxah8gF4tKfjZ44KVMYbTaoxoldx8fc+ LsMudcXvuyR9pqoPxoBFQDrdyg9EAxzzLRufov5ld9hAaBICevK2Shfq1SSAnDdg JvuABd0B9MNYzLb5SHPS6eF+Zs0dPYz57j0fivAhapFnnI7u7WZ7Ok1b20wnyvNy stFA93tV2c6Szw8SMC7mQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrgeelgddujecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgfgsehtqhertderreejnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepgeefjeehvdelvdffieejieejiedvvdfhleeivdelveehjeelteegudektdfg jeevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id BADAB19C0062; Thu, 18 Jul 2024 05:35:53 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-568-g843fbadbe-fm-20240701.003-g843fbadb Precedence: bulk X-Mailing-List: linux-arch@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: In-Reply-To: <20240718-stammer-envy-f77637a8d039@wendy> References: <20240717061957.140712-1-alexghiti@rivosinc.com> <20240717061957.140712-6-alexghiti@rivosinc.com> <20240717-94b49fbac3c6bf97a0f96281@orel> <20240718-stammer-envy-f77637a8d039@wendy> Date: Thu, 18 Jul 2024 11:35:33 +0200 From: "Arnd Bergmann" To: "Conor.Dooley" , "Alexandre Ghiti" Cc: "Andrew Jones" , "Jonathan Corbet" , "Paul Walmsley" , "Palmer Dabbelt" , "Albert Ou" , "Conor Dooley" , "Rob Herring" , "Krzysztof Kozlowski" , "Andrea Parri" , "Nathan Chancellor" , "Peter Zijlstra" , "Ingo Molnar" , "Will Deacon" , "Waiman Long" , "Boqun Feng" , "Leonardo Bras" , guoren , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Linux-Arch Subject: Re: [PATCH v3 05/11] riscv: Implement arch_cmpxchg128() using Zacas Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable On Thu, Jul 18, 2024, at 10:33, Conor Dooley wrote: > On Thu, Jul 18, 2024 at 09:48:42AM +0200, Alexandre Ghiti wrote: >> On Wed, Jul 17, 2024 at 10:34=E2=80=AFPM Andrew Jones wrote: >> > On Wed, Jul 17, 2024 at 08:19:51AM GMT, Alexandre Ghiti wrote: >> > > + >> > > +union __u128_halves { >> > > + u128 full; >> > > + struct { >> > > + u64 low, high; >> > >> > Should we consider big endian too? >>=20 >> Should we care about big endian? We don't deal with big endian >> anywhere in our kernel right now. > > There's one or two places I think that we do actually have some > conditional stuff for BE. The Zbb string routines I believe is one such > place, and maybe there are one or two others. In general I'm not of the > opinion that it is worth adding complexity for BE until there's > linux-capable hardware that supports it (so not QEMU or people's toy > implementations), unless it's something that userspace is able to see. I don't think you want to go there at all: maintaining an extra user space ABI (or two if you add 32-bit BE as well) has a huge long-term cost, and there is pretty much zero benefit for a BE ABI these days. Adding it to arm64 turned out to be a mistake. We did have a handful of users in the first year, and it technically still works, but I don't think there are any users left after they managed to fix their nonportable legacy userspace from that was ported from big-endian mips or powerpc. Arnd