Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1810045rdb; Wed, 31 Jan 2024 09:38:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IErT3Wm2IvlMqZwbHwWKiVefs/eHteswoK5cVb+YOEy76KDRK9LjbesB6KDUVLdZ3BIiawX X-Received: by 2002:a17:906:4687:b0:a27:7de8:9cd9 with SMTP id a7-20020a170906468700b00a277de89cd9mr1602336ejr.23.1706722728573; Wed, 31 Jan 2024 09:38:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706722728; cv=pass; d=google.com; s=arc-20160816; b=Wn0eyk+liRmjnW/ZE5euCU6vJ2uTi2UAI90JTCN4zFTQdj5oiRP1RxKAoWZux820Ab PFoXGBW776Ihai21s7akNDiaH8LZj0v8KeP5JZS3+e4jgLuZkmpFEc7AnLjhvlWjtXEl UyoB/sAWUdfq52X+scX/NBAbLNiQ6eifl1MTPqY0gBA7m0dONafYxZuJDGCPRXwAxdud FKhTaK8YHNYIaFSDQ0zn6sXjx2IpgR4rYfmS26c9WFNNvfWlyDLfmtbKvv57w0TMKOTM 23DsgY8n2ssQsZGDVMFqjaokJsohS3v+iuiV18YMZcAGzuD3/ySTMW/9nGYQy+g7tLZq JsuA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=kgoXMLxLfwuR5CCSM+KrYwgsofMw5vUJyI7U1yTxFyc=; fh=rsHgGZ/l9siL6nDn3rbVeaPHqlzWI8ymtJJ1n8Bx0bw=; b=Wp2GCIruCd0EyBfpmua1A+gW67i9upfpVRt6BCzeIK/vEftD78ZSE72JnXJNpjGXQx 3MRoH/XRXUSc0zRXb2Kn3hCb1G+k8UcqGR3aaaI087xpjEqei3TXdhO/YazVtkM+s1hE IWqqHrFBdOokrkmyKFIfcYnrBQugu2u8oA2v1HgMrpYqCqZzn9cuZ76zRu35BK6XddKW wpSfwY1tBf8johsIx5t4hxEwQVELrjYJPAbXPKeVL1SvMuWO6E/RTHC99zRGPj9PefYt seN9D7dWWmSV0uryrno05Mw7Ds/Z3s+byMJgtlKH2LcAXMcXCTeSNYxMGJPRwA91v4o0 758A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kFRoN59Q; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-46913-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46913-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCXJs06eAKknb2AadZX1YT3Fllm+4xC3lIYyT3+nTnBQLV0ShuW9IPsq2e+Uy4tUnagP4S5bIQc2v/hK6sk8OzTvS2CIckNyt5L9+4mVMA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id n17-20020a1709061d1100b00a354b102fa3si4654079ejh.1050.2024.01.31.09.38.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 09:38:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46913-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kFRoN59Q; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-46913-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46913-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 53DEB1F23C85 for ; Wed, 31 Jan 2024 17:38:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B991412DD98; Wed, 31 Jan 2024 17:38:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="kFRoN59Q" Received: from mail-yw1-f169.google.com (mail-yw1-f169.google.com [209.85.128.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 320A07EF1B for ; Wed, 31 Jan 2024 17:38:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706722717; cv=none; b=sHcHnM6vNKeXo0KQ4elRps2HEVWW/uXO0o3MA1LS5baXzbuBzPmfNPIOAmhNiCcCi3dnQeVGx/2OgERCRfLnMhUq9pGxcqd66KuORJ+NdDKDRu2BFuNT1UulwY0cT6RgC14NJX0iL7iGiNicBTy8Qmy+ok//8luwmF7LsitcqpI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706722717; c=relaxed/simple; bh=kgoXMLxLfwuR5CCSM+KrYwgsofMw5vUJyI7U1yTxFyc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=HYl6vcmXZcNBLKhnUZ9f3td7Iu4402ksIQbx9Opg+FHHqbtYVppyOFuN6PVvbCse1GyopdlcOR7/CO3OWFqPD+TvVInoYmpX/B9nmfo4mz/u1VXV0Pg/Xt86vPmfDWA0jm4jMw4MCXxwiz/bBVVd+icf4ltICgOxo+Hbz12V4Us= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=kFRoN59Q; arc=none smtp.client-ip=209.85.128.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yw1-f169.google.com with SMTP id 00721157ae682-6040a879e1eso11710767b3.3 for ; Wed, 31 Jan 2024 09:38:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706722715; x=1707327515; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=kgoXMLxLfwuR5CCSM+KrYwgsofMw5vUJyI7U1yTxFyc=; b=kFRoN59QsJDZNdR+UQBR6WZSrUV+QNbwjXgbYXdBRrQRA0R5U561njt7f0X4LbBH/H HOkIJ1hPlyiK5ZCjcxlbM/ulkX2CL8I7zXUjLyyAp8ySNb4/vmAiCHHtM6iB8OLJWbYB cGXuagd/m7Y9lLyM9P8iyg54whA/HXMksclsY46elCBBiHnWpxTQlOW4xmVUxSf0II+s 1PWrZ6zO5jFfprou0jwprtI1/5W9qwMysTO1M9yFV0Bhp29HqpM2wgpk9EfYSoz5uRvm 9Al9xHrXRtpd0BLz6fg/BWKoMuNGRiXw9IceHEgbt6kaZrXRNgKaRyglmn4oIXMNgWG7 qDiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706722715; x=1707327515; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kgoXMLxLfwuR5CCSM+KrYwgsofMw5vUJyI7U1yTxFyc=; b=K84+GFEKZqOgLAYTCjCuv9X67F3buGqMlJzLErqqthg7xrRq2Gm6J3eaeES+xokOIo +DCt/ryEDUpmAQrhmzDlp3sm0of7kC9nfG7jCkSK2lNJnG0zqg53o2APBDsCro9HXqrg OgsYXRMthxo+XWWZh9vqsBOUX+V3Yx7CgrVUhr8vO4xrlNtto0zmCkzaJFaUVgY/2x/d osoXY5ToqjoMdVxTkq4Jvm9ZHRNXQZmbhUB91vAOTD2dCa6hAVgOcz3ZSm17wwGXgFJ4 BY5olUNxdm+kdcsrDwn7yfEF5t8ax+9ti5GGwIgg5HX7Lz6XPK5FlLNmdy8I+Al+phg8 i3+g== X-Gm-Message-State: AOJu0YxBrpynOU7SChWnkY8/AsXsBcF80YJHjluvraygBl7jnazONrSz 9W8e/RjUjhRR9cjao8q7luK8c6PYj1zJzB65Q1xJg301d+kNQPleHSCMD/4T3hUMnHVGhPoUewg ipxM5oN7SSaEBWrjd+4OWnx4RsbMybBFf34Z78WGGngTefb50 X-Received: by 2002:a0d:d4d2:0:b0:5eb:d94d:4300 with SMTP id w201-20020a0dd4d2000000b005ebd94d4300mr2211249ywd.19.1706722715084; Wed, 31 Jan 2024 09:38:35 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240130124828.14678-1-brgl@bgdev.pl> <20240130124828.14678-3-brgl@bgdev.pl> In-Reply-To: <20240130124828.14678-3-brgl@bgdev.pl> From: Linus Walleij Date: Wed, 31 Jan 2024 18:38:23 +0100 Message-ID: Subject: Re: [PATCH 02/22] gpio: of: assign and read the hog pointer atomically To: Bartosz Golaszewski Cc: Kent Gibson , Alex Elder , Geert Uytterhoeven , "Paul E . McKenney" , Andy Shevchenko , Wolfram Sang , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jan 30, 2024 at 1:48=E2=80=AFPM Bartosz Golaszewski = wrote: > From: Bartosz Golaszewski > > The device nodes representing GPIO hogs cannot be deleted without > unregistering the GPIO chip so there's no need to serialize their access. > However we must ensure that users can get the right address so write and > read it atomically. > > Signed-off-by: Bartosz Golaszewski So this would give barriers around desc->hog, so we are talking SMP where the same hogs are added and removed on different CPUs here I suppose? Seems a bit theoretical but OK. Reviewed-by: Linus Walleij Yours, Linus Walleij