Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1225861lqo; Sat, 11 May 2024 13:09:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVlnQUBwQ3TTV4bGXN4oZb00Fqn5mwi6b1R9PndxwP8pSJ45tsbMRwb+W0FsrZSdudm/BQ3YKuYpBzdmdDf6o/jQ3TDmreiznoac2i6/w== X-Google-Smtp-Source: AGHT+IG8jwiQZT4qudGJLJeIos296dEH2bALFV2U4vJrrAyezxFGGme+uMcq04wKL2R0oYavutwa X-Received: by 2002:a17:902:74c8:b0:1ea:cc:b59e with SMTP id d9443c01a7336-1ef43d2e3ccmr63711235ad.19.1715458181403; Sat, 11 May 2024 13:09:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715458181; cv=pass; d=google.com; s=arc-20160816; b=x8CPHKIsY6Ctvjq1pcYxAAcOTcxwx1N3P8kYvQDxi0amMavaN45tNakYMnLKG8DrjQ 7YJEo+5/LPthd5y1MY2SCPBxB2bK7sb1UC+1OB7FmUgN8Ja73rW/PSrFvSOBC4iiVCXg 1n0W/UugEtnZCvA/j/WFQrCoomdags6Pescn32ck1xhNHejMI9L71kErLyRmBkN86ZPL +je6FwIMkAu7pDmhYnE4t3dfIML/1BuSpB7Ck/dxhoqVOI3mxuIl31MAoqoXVHDFvyxA hVkeC5OxZ9WDP2BAdlVxz9S0c294DIxauCWe5G8G8sRsZJFDJGB6NV03A2NfPwFQ7iKU leTQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:cc:to:from:date:references:in-reply-to:message-id :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:feedback-id:dkim-signature:dkim-signature; bh=HPItATo5fx8l5WFkFOeYczqSjME8h6efh0zZWmdoRF4=; fh=aFzjv1fD1IkVudi22YncCNL3/eOfT7gc6pITDGhPMCw=; b=W01+QsXK1pdYzzCkF5Z/azGrZrqrDZ/9SW3jG2Ft5Nd+sR64yXXfD80M+XncC9UvRN 99NSWMX9NvdmcdGVmrmtKk8f0dOvqfV7YRMEDUY5LVrz0sUq3EfKylbPr+uymnt5d8Wx joo4Tr/ZNJJBdjIBllxlSr8fqvbYlOtIqXTk4J3QZvfM/++PFezwbzWaQkXK3J2M7xFj B9x5kTjYWMBUJf/3CFtiAc2vrabEYx2/US3HjmstRJO+BUywluiHhMABZ9NdNwYqEHju gdwgAzStA1gmNF/aVBToRPQ4szr9nEPXlWVhRUhy0neyCIXQRSipxJBXSnpwIao+sj64 R38Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=lcBk53jC; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=S1+cFDux; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-176721-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176721-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0c039f35si59039335ad.381.2024.05.11.13.09.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 May 2024 13:09:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176721-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=lcBk53jC; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=S1+cFDux; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-176721-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176721-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C5B2AB20FEF for ; Sat, 11 May 2024 20:09:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 596B1208CB; Sat, 11 May 2024 20:09:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="lcBk53jC"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="S1+cFDux" Received: from wfhigh6-smtp.messagingengine.com (wfhigh6-smtp.messagingengine.com [64.147.123.157]) (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 A06DA200C1; Sat, 11 May 2024 20:09:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715458166; cv=none; b=BvtZ/eVwvN5bZTHUK2hTTXGqTttlW/iBAQ4O/olXPt3esWdbjAhOCEsW+v8ciA4n2pwaC5FN+fXN3r4ftpzwxjW5juhBQOXbb3g3cDkcsAJFM1GEF/VOY+eLXuuM/ucgEFEA5+oUXxjmbb2SpLQw5luZ0uCb9aoZiwkZrJlhLUQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715458166; c=relaxed/simple; bh=wgbkZOngIgE+nsdfV9G/puBvKYsmjScbDDIwPrE+KsI=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=suQmr7i6thdtXMaB9G6zLK0oIyo+QYrnjw4UMf+Ej8aBl1Y3r2Rg/3zYXEFqrObuLP8a3KA+jAf/unWmRf9kiifO2EQxE7vbAiG0iwwOLZ9qa2zBGJjxyBTAU7MmMJoKiSWrTIIjIUPOwozUT+kUYHXQzDgstoVJTVZ/iPMP7yA= 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=lcBk53jC; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=S1+cFDux; arc=none smtp.client-ip=64.147.123.157 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 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.west.internal (Postfix) with ESMTP id 15F7D18000F6; Sat, 11 May 2024 16:09:22 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Sat, 11 May 2024 16:09:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc: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=fm3; t=1715458161; x=1715544561; bh=HPItATo5fx 8l5WFkFOeYczqSjME8h6efh0zZWmdoRF4=; b=lcBk53jCOF2+k/udzhE5d+j8Yy UTO9UYQqHGvmZ4W7oHim4+rSOuEWnwnTGmggF5b+qzg0Sav1/lRrF68Kejrx7w21 YIhCp61jso33ua95WDRkcqQGQIntJn2Y/1GXFeRxX4H3o9LG3QjVQ6Y4NNFbITaa 3n1tSK+m2mQLZEZ5tJqmCjD9QNrff0iGp2VBkId/BmXHx2UF/tioJQW6qNinXN8C ygMJNWtf4IuE7Z75Jgcn9Id/DFWhaHSGC30IUA3zoQjJ9ySOdVCHSWYMMK6rmJtA gjqgzX98afev9mI6YDcXBC0nAxyQhxMnuPHZswUu5Ilx79XrofD8YFCi1tZg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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= fm3; t=1715458161; x=1715544561; bh=HPItATo5fx8l5WFkFOeYczqSjME8 h6efh0zZWmdoRF4=; b=S1+cFDuxjUirv18s+Y7mRUSPhU/wMjYf7igtpXaM4mkH ksHg/ZjSUmY4b1ciOm3UaS+ik+IJtakDA1qzxa+XlH1/YOC4Z/tPghntGIzQAYOl v1zh8RBNDpe6nn4Hp2Pl8Vy8NApaJxr/PiUiRDEIIoPc1jBrscxhP11IKbB1NPF3 o1kTdYm86G/2B8vkbHe2t7h0tqmqFJ46R9Ot6mQ2OstTORRH6IL61CN4LDRhE8yK HzWXiuAnNMdIYhN5TMyVg4aQUTN61nuvmvUQoW+cjHYTH5PjSRSC/TFxz1CRfmW1 J4vqTqtulCCD46pc//q+7nvRK1j3piaCCywULv3phw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdegtddgudeghecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrg htthgvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedt keetffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id AE36AB6008D; Sat, 11 May 2024 16:09:20 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-443-g0dc955c2a-fm-20240507.001-g0dc955c2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <8dd1c466-54e3-45c1-a19f-f81dd9dbf243@app.fastmail.com> In-Reply-To: References: <71feb004-82ef-4c7b-9e21-0264607e4b20@app.fastmail.com> <6e6dae45ffbf7a6ab54175695a3e21207c6f5126.camel@physik.fu-berlin.de> <46543a98-4767-471a-91be-20fb60ab138b@paulmck-laptop> <7432d241b538819b603194bfb3a306faf360d4b1.camel@physik.fu-berlin.de> Date: Sat, 11 May 2024 22:08:50 +0200 From: "Arnd Bergmann" To: "Paul E. McKenney" , "John Paul Adrian Glaubitz" Cc: "Linus Torvalds" , linux-kernel@vger.kernel.org, Linux-Arch , linux-alpha@vger.kernel.org, "Richard Henderson" , "Ivan Kokshaysky" , "Matt Turner" , "Alexander Viro" Subject: Re: [GIT PULL] alpha: cleanups and build fixes for 6.10 Content-Type: text/plain On Sat, May 11, 2024, at 21:37, Paul E. McKenney wrote: > On Sat, May 11, 2024 at 08:49:08PM +0200, John Paul Adrian Glaubitz wrote: > > The pre-EV56 Alphas have no byte store instruction, correct? > > If that is in fact correct, what code is generated for a volatile store > to a single byte for those CPUs? For example, for this example? > > char c; > > ... > > WRITE_ONCE(c, 3); > > The rumor I heard is that the compilers will generate a non-atomic > read-modify-write instruction sequence in this case, first reading the > 32-bit word containing that byte into a register, then substituting the > value to be stored into corresponding byte of that register, and finally > doing a 32-bit store from that register. > > Is that the case, or am I confused? I think it's slightly worse: gcc will actually do a 64-bit read-modify-write rather than a 32-bit one, and it doesn't use atomic ll/sc when storing into an _Atomic struct member: echo '#include ^M struct s { _Atomic char c; _Atomic char s[7]; long l; }; void f(struct s *s) { atomic_store(&s->c, 3); }' | alpha-linux-gcc-14 -xc - -S -o- -O2 -mcpu=ev5 f: .frame $30,0,$26,0 $LFB0: .cfi_startproc .prologue 0 mb lda $1,3($31) insbl $1,$16,$1 ldq_u $2,0($16) mskbl $2,$16,$2 bis $1,$2,$1 stq_u $1,0($16) bis $31,$31,$31 mb ret $31,($26),1 .cfi_endproc $LFE0: .end f compared to -mcpu=ev56: f: .frame $30,0,$26,0 $LFB0: .cfi_startproc .prologue 0 mb lda $1,3($31) stb $1,0($16) bis $31,$31,$31 mb ret $31,($26),1 .cfi_endproc $LFE0: .end f Arnd