Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1597474lqe; Mon, 8 Apr 2024 13:56:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXX25ngc7dc8pzl8i0ue0CVDNs7Nf8mJhCvdv2KgFrxrYW7skUZTqC72TDEheyt5AM4S+FgzIe8XYfS8fYLa7S8FVM/nSfmTlSILNPg+A== X-Google-Smtp-Source: AGHT+IE9QIOzcPOdkwERWtAowJtQnzw8xnUzJEistR2fVfCP1ob2wR5+n7S6IGXfvGiShxLwuYqb X-Received: by 2002:a17:903:1d2:b0:1e4:3f8d:12ca with SMTP id e18-20020a17090301d200b001e43f8d12camr2718232plh.14.1712609714402; Mon, 08 Apr 2024 13:55:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712609714; cv=pass; d=google.com; s=arc-20160816; b=z+LUrKx1nJCDEl90jupR/kmz+f673Zj6zEtz2SCpHj99LltmCJPxn/w1AfmVxcTMJX L4yztA4o3cJQ0d2+QIZWWyLCgMDKx8wze2gCYUGl/axeOq6/JKdUKiq6VsSq/tqst8Ca sXKNKcw9uxJmrCsbZKK45kK9MFQSRwTkVvC7gUl95JT2why9FgQRAbDMkmHBeAvmPSg0 bNE526TOsGVK2SS1QS0WupnF27CagFvLxkM64shetIO/6oorm2EvaE/ccysfehVJ+23S cUHY8BwMOcMpCqD1K5rcxtZe7mJ9E4ktji+bZ1EsZsk3+3NULZKWJNJ3s/FrfyYGNKC4 2y2Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=oRm3VmN9nFQlw4LB7c2YfBqCDmyuh/+QyJbUAbj/PEQ=; fh=rqT+2k3smcjX55XZo7sb0p7F3O9tQBHD/TcV7uIRHAI=; b=N+zHzoenGrUNTQHPTqmgYyHeHzgkvl8p12SKZhOHUREEBfzd0VXyzu0QzqjtwOU4Cp 1lt/a+fgOJtn8CHWGOf4xlh6OB95LKw9kS6cV6wPKU1quE5AxExh7GhRi8cpA3zX4Ijy K+O7JZoWV+V0fHhXvtJxJUs4t/5fXeiTU2c6RfaFe1Lhm3pqtaG58WZDNRwsHZMoxD3c tr3RXqMQiBzu97Obu0tnLimbkZt9pUC5/F7kY7uLvjxbFhd6d3qKAiM0oaWdyivWR0yR xLQSh97V8x/3cgcmRAVpw6ZMGsROwNNZA6vraLpz2QKHL3QAOM90RShtbmumqy6dFT6G hiXA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Wa6YA5UD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-135919-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135919-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. [147.75.48.161]) by mx.google.com with ESMTPS id u16-20020a170903125000b001e28bd89a7csi7217637plh.248.2024.04.08.13.55.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 13:55:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-135919-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=@kernel.org header.s=k20201202 header.b=Wa6YA5UD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-135919-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135919-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 9A303B234AC for ; Mon, 8 Apr 2024 20:54:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 909B3147C60; Mon, 8 Apr 2024 20:53:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Wa6YA5UD" 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 B24C014601C; Mon, 8 Apr 2024 20:53:53 +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=1712609633; cv=none; b=MVfYJ7jx23FFPZL1lG3OK/CWdyAdr+Bf+r5WHXfwuxprUsaoVd9XJw7JL0MExKLF4X9oMEeSW4nTvdCCSMT0SVqypVb4fz1qxWtFoE1XTtMpkeEI5jFY8H25pyk8aaNxSO39/1m8mxwRwEWtj4wxz2fbg95Z5EBXwvRJEniYf64= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712609633; c=relaxed/simple; bh=KU0aZoQogbYaaiBUupsRPlXydh4mg/fVrHbYunWm8SI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=I9hCvutkyGEvoq2pvLW6arsdIhZtrs56A2v85BzzgJEwW3U5BUjLOGSHEq8OpXCF55dXalpy/5+OrI2XUqFsK0K7zzqymt011G/l+T1xif6jjNi0eDmPDafzO1BtpkGj4uKIcsvzkk2IVXCFzefcHhzuPOSzKd9DnkmxMIDlSVI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Wa6YA5UD; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4455BC433C7; Mon, 8 Apr 2024 20:53:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712609633; bh=KU0aZoQogbYaaiBUupsRPlXydh4mg/fVrHbYunWm8SI=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=Wa6YA5UDRRxQIpnvaOrK2H3MZdsCJhqVYthmIc2LaQPtVrDqIbuVv3xe0JklgbhNC GCVMXHk8fHCVF4yWCkQKCePn3vRFXrmoOqMFR3nKA4uQxSlw2SziX//OeQBKuphiyC xjEOs8LtMk3vRvXeK+L/BjWkmlxHOzGVj5uasadKrg16xJan1ROKTeIcXAWHYKrfYq rcm7WL09lN8NXVQTSDLNcspSF7NgZuZQp8jJ3SObo2NPjTdXqTpI31iZ4/yJurH1lQ RLGcI/mgf5usU37YfRdoULegxw4bwQ7+0uOToPT8u6nRbW+Q4lfsOaYIJPMXMycDR1 U7PKsikuTrd1Q== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id E10A8CE126C; Mon, 8 Apr 2024 13:53:52 -0700 (PDT) Date: Mon, 8 Apr 2024 13:53:52 -0700 From: "Paul E. McKenney" To: Linus Torvalds 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, Arnd Bergmann , Al Viro Subject: Re: [PATCH cmpxchg 08/14] parisc: add u16 support to cmpxchg() Message-ID: Reply-To: paulmck@kernel.org References: <7b3646e0-667c-48e2-8f09-e493c43c30cb@paulmck-laptop> <20240408174944.907695-8-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=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Apr 08, 2024 at 01:10:40PM -0700, Linus Torvalds wrote: > On Mon, 8 Apr 2024 at 10:50, Paul E. McKenney wrote: > > > > And get rid of manual truncation down to u8, etc. in there - the > > only reason for those is to avoid bogus warnings about constant > > truncation from sparse, and those are easy to avoid by turning > > that switch into conditional expression. > > I support the use of the conditional, but why add the 16-bit case when > it turns out we don't want it after all? You are quite right that we do not want it for emulation. However, this commit is providing native parisc support for the full set of cases, just like x86 already does. Plus this native parisc/sparc32 support is harmless. If someone adds a 16-bit cmpxchg() in core code, which (as you say) is a bug given that some systems do not support 16-bit loads and stores, then kernel test robot builds of arc, csky, sh, xtensa, and riscv will complain bitterly. Plus I hope that ongoing removal of support for antique systems will allow us to support 16-bit cmpxchg() in core code sooner rather than later. (Hey, I can dream, can't I?) Thanx, Paul