From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 BDC79CD1292 for ; Mon, 8 Apr 2024 18:15:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EMroT/+pxFeN+dW+NLizVNcoVWT2yKZ6+gLUHNqRZSM=; b=QD53SbYEVXHXGo f2fVrTPG6i4iDV42T5eaPDr3OTYYOgV+nelHb1rMEzelOYFWLBds16GiTnFtlHjvDq4U0Y8FhUU25 FPfvr54y2bPsR+xPOx7uQuwIt6PxJ6IQmQCdykNBmQ3vpAYNrc3JPOHddgckg756pl34wkWnBQCJw /GEDzPNLAnk5PeGLTudSSiNV9vKOm2bCnKiPJdQXbLXn0R3FgEH0WG3ikqDYAXK7Ep5jrWawbc57V 0oOxRBeJY7UVBEmGqYgnRvUk5ka+E3wF78nyD9Xna9HEl1x4//D7lzhIO1qbBL2OBjqmirfog05aI 550aK5So11DtSgZ2tUuw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rttWw-0000000GSSX-2JDR; Mon, 08 Apr 2024 18:15:42 +0000 Received: from zeniv.linux.org.uk ([2a03:a000:7:0:5054:ff:fe1c:15ff]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rttWt-0000000GSRV-0Rt9 for linux-arm-kernel@lists.infradead.org; Mon, 08 Apr 2024 18:15:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=lABSIXPCn9p8sq353W0yAZhqYSCgGyOF0S6qhldHPVs=; b=rD/DuaXGJUwscfQo6NGAG8g65s tCzL7+mWcBjrNTrmZag077vReK7YhF9gncf0MwHcNkynQKZrrryCqMno6LpBRbsLVkbJMYcqMTk8p j5iM0qqotUpxDQkZc8YMeNhn2cmm3ZYMqLbv1IJXwIUjXasU7KmeUFqQvZMU5UYpUgad729+PY6uv 3I1xKRatGGvS5iW2NGLFI18yKnjFt+vrFUqwT+7nvKoM/L+0XYV31HiBHJxan0g8SvYgmUIdZUgj/ 5zB/CAY0RdNSRipc6fkXry6fwS74eDECzfGai5oX7VzRgvQJxFnC3suRfxdoHCWpGXqr3xatvzgfQ 99plpD5Q==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1rttVt-008cm8-04; Mon, 08 Apr 2024 18:14:37 +0000 Date: Mon, 8 Apr 2024 19:14:36 +0100 From: Al Viro To: Linus Torvalds Cc: Matthew Wilcox , Philipp Stanner , Kent Overstreet , Boqun Feng , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, llvm@lists.linux.dev, Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , Alan Stern , Andrea Parri , Will Deacon , Peter Zijlstra , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , "Paul E. McKenney" , Akira Yokosawa , Daniel Lustig , Joel Fernandes , Nathan Chancellor , Nick Desaulniers , kent.overstreet@gmail.com, Greg Kroah-Hartman , elver@google.com, Mark Rutland , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Catalin Marinas , linux-arm-kernel@lists.infradead.org, linux-fsdevel@vger.kernel.org Subject: Re: [WIP 0/3] Memory model and atomic API in Rust Message-ID: <20240408181436.GO538574@ZenIV> References: <20240322233838.868874-1-boqun.feng@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240408_111539_163430_16386163 X-CRM114-Status: GOOD ( 14.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Apr 08, 2024 at 10:01:32AM -0700, Linus Torvalds wrote: > For our own historical reasons, while we have a few generic atomic > operations: bit operations, cmpxchg, etc, most of our arithmetic and > logical ops all rely on a special "atomic_t" type (later extended with > "atomic_long_t"). > > The reason? The garbage that is legacy Sparc atomics. > > Sparc historically basically didn't have any atomics outside of the > 'test and set byte' one, so if you wanted an atomic counter thing, and > you cared about sparc, you had to play games with "some bits of the > counter are the atomic byte lock". > > And we do not care about that Sparc horror any *more*, but we used to. FWIW, PA-RISC is no better - the same "fetch and replace with constant" kind of primitive as for sparc32, only the constant is (u32)0 instead of (u8)~0. And unlike sparc64, 64bit variant didn't get better. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel