Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp307713lqt; Thu, 18 Apr 2024 16:23:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUmboZBk1QRFdGDQOoKUcC/CM2TolKfvzmzcvRvOHFp5Z+cl/yivHMAasC7FRdWeRFqnK3bRSKM5NHIyppkFoOMbvXHjK49zWlCfyVx0Q== X-Google-Smtp-Source: AGHT+IFmRXN4SvhCCCb7GM7fH5n3UTHn4P3EMpwzt4+7KQqCfyNDf1FAjFK+3VNrzqwN1WhojBAY X-Received: by 2002:a17:902:e84f:b0:1e3:e0ca:d8a3 with SMTP id t15-20020a170902e84f00b001e3e0cad8a3mr733664plg.6.1713482590976; Thu, 18 Apr 2024 16:23:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713482590; cv=pass; d=google.com; s=arc-20160816; b=EOiEpG4rb5nDv8NLSuwgGiZ7dQHmWF0IPaP4dGHdcxA7M4Z14HuSjyOAwfsxZqaZyH TquSqcZ+d94+tMfLi5ioPnD7xDkXsCvmBeoBaGXUaVxzlrJ53FX/A2w75BNFpWapKhOh jzdqyR+xJvgn+FJlRSebxjRzc4+0N1pFiwVSDPFwyjzXfeReZoD8O6O7fEJXRu9g5sIc Ox2d+xAfK+TEiun/nowwxkVZinCkaJiO3lzIsPYcz4AFZxGr5FbTn0zxgYxrtwXn8VuF 5/xAewK3AzaChtyaoOI9itt40Ot61pvoJWo9PPrrDeWD40Ho5B/I1CgNXIvysuR7SEjs Q1qA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=P1LWxXd92eAlrMoNtDVxtTQ1j2AMsUgnCfD7rImwlNQ=; fh=lg3kpvdE8uA/1yL7tJ4S646XnCL8kTaf1LQ9p3YHF+M=; b=IEc582NndzzmPsgzSAmzu4+jY+x96ApuEUY6PT6mMZrQ9sQuq/gxqRhWRf5Kp7Rrs1 VgLHvn3nJrdJ8Hj+ZdsTaFS0dg2rso0cqQ4000EA9KtluzcHbmiYKRtmp7x4uE2AFMem uG3RZ6SEq+SJwvMpVQDsIEYE5f91fODdKdlq0e+dfA1F0FiIHiRS/0+kqtiflSEA8yBz ZpaS1jPvOb3euPNibadHsEEY2+ldTPDEKu1qn1OSfQGtGTCJzGJz+I4Imw/90x72R7VU 0NeYe5vdk9jauRHwlQmeSpRUAXZpnEUa2yfRkrTkzMHBYP7I02w1Mqo9enMNlXAelSVT JnxA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ce0ASPgg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-150861-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150861-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id s8-20020a170902ea0800b001e8505652bfsi2284884plg.2.2024.04.18.16.23.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 16:23:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150861-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ce0ASPgg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-150861-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150861-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 34E70B221BF for ; Thu, 18 Apr 2024 23:22:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6529971B3D; Thu, 18 Apr 2024 23:21:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ce0ASPgg" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 80CAA2E41C; Thu, 18 Apr 2024 23:21:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713482510; cv=none; b=CZH5B9O2KUg2VjuCNQFE6HX4Bb/CmIM0GMahhntimv+KdUf98MKMjMmsDti3NyWPc2enux/jgxZDHzkyc1tf66vaQm6AZgjGinCjN4NIuIAEuOjTPuSZq4xtjSz4r0GVNF6cE4njrYqIwTZEf2rPaqIXyIQoXpHG3y8W6FNN67A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713482510; c=relaxed/simple; bh=dzxvq6I5MOiA+x8U3pxHwdsyCxcbLN+w/BGN0JJSvvU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aOQ9I/PL7tE1A8Kvm/z/7GhWzESRrGEnpq/wDemwcE+xBYUGnb0htwLfcbjeNyilGHGdBCmfyShl8rNIMHgz/oNvLq5ujjRU7nqESdIKMPZHFWGUKjg8A/+v7oO2lgCAgIwsifFkpaoeQWDNvVY0YTiUMHrj9bgUxLBC1AnyuLQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ce0ASPgg; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C585BC113CC; Thu, 18 Apr 2024 23:21:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713482510; bh=dzxvq6I5MOiA+x8U3pxHwdsyCxcbLN+w/BGN0JJSvvU=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=Ce0ASPggVM3gvb5vctWsZjOCjy4IdytPqulNMC7utAYhDf0V/N3ZuYvMDTF2FcgKn JJ84GJtk/DZuVVpAFEtn1ljT58BMCvumGpif5rW4j7qlU+6mLGdQaDU7SvkugtcFDj YhdZYi7TADD8jCsy06WitTN/BBcpkKzhewLHzHtfl6/3KYo+8y9MgbLlJp1hmx6f9+ SPHwWOoy2/1eoppm5QyvqjmGlnAZuLqhIn6C+PmrnYUOZu7z+YMCnl3zOTfaxetNo3 Sczjd8qDH7ICY1LUcjv6ujvVorrdhi3YjOWLs73xF2nzijOg9fnc9Vf/JbmBYnuSeo 3U7z3MxSZCw3Q== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 7DCC4CE0444; Thu, 18 Apr 2024 16:21:46 -0700 (PDT) Date: Thu, 18 Apr 2024 16:21:46 -0700 From: "Paul E. McKenney" To: Geert Uytterhoeven Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, elver@google.com, akpm@linux-foundation.org, tglx@linutronix.de, peterz@infradead.org, dianders@chromium.org, pmladek@suse.com, torvalds@linux-foundation.org, Arnd Bergmann , Yujie Liu , Andi Shyti Subject: Re: [PATCH cmpxchg 13/14] xtensa: Emulate one-byte cmpxchg Message-ID: <620a10e8-f5c0-4e23-8403-492ab1c7f110@paulmck-laptop> Reply-To: paulmck@kernel.org References: <7b3646e0-667c-48e2-8f09-e493c43c30cb@paulmck-laptop> <20240408174944.907695-13-paulmck@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Apr 18, 2024 at 10:06:21AM +0200, Geert Uytterhoeven wrote: > Hi Paul, > > On Mon, Apr 8, 2024 at 7:49 PM Paul E. McKenney wrote: > > Use the new cmpxchg_emu_u8() to emulate one-byte cmpxchg() on xtensa. > > > > [ paulmck: Apply kernel test robot feedback. ] > > [ paulmck: Drop two-byte support per Arnd Bergmann feedback. ] > > > > Signed-off-by: Paul E. McKenney > > Thanks for your patch! > > > --- a/arch/xtensa/include/asm/cmpxchg.h > > +++ b/arch/xtensa/include/asm/cmpxchg.h > > @@ -74,6 +75,7 @@ static __inline__ unsigned long > > __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) > > { > > switch (size) { > > + case 1: return cmpxchg_emu_u8((volatile u8 *)ptr, old, new); > > The cast is not needed. In both cases, kernel test robot yelled at me when it was not present. Happy to resubmit without it, though, if that is a yell that I should have ignored. Thanx, Paul > > case 4: return __cmpxchg_u32(ptr, old, new); > > default: __cmpxchg_called_with_bad_pointer(); > > return old; > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds