Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1899756rdb; Wed, 31 Jan 2024 12:33:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IEA6SiciaLuYUi0sxowm0gLh/Z1B/T+mRLhduW55s4q92EuS52x/il+K3Bt21t2ULHAKbg2 X-Received: by 2002:a05:6214:1252:b0:681:7948:220d with SMTP id r18-20020a056214125200b006817948220dmr3085881qvv.61.1706733227141; Wed, 31 Jan 2024 12:33:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706733227; cv=pass; d=google.com; s=arc-20160816; b=AVhGVN6TepJDYI3IScrRkVBvrlwIUdh0jeF9xKF0FBfTp4RDEbA+gjMx3WHNYKr8oZ 9eU7lAL610A9PUEdezphyVnlFyKra7wiu+7YkkeMVg/PNG8WVKXf184FxG7u9C66N3su F+6yukGoyxfKBvTABitWqIBr1AkOLhVJbenndXTDdFc9eZtl/y6G5uYlVilUFZJtf0P6 rt4HJJlAKBDlrTDA2vSsMomt4RSF3iMuyPPsXw6dcCEzZxConceUJzk7ayduI5pnlDLW Vct5yFaZtElCMg0SBKvsZ+DISw4wCkIztS1gEirR1V7BUUv3UeNiaST3IZbYtE9vXdhJ okdw== 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=fkN7ecc9GY/Pf9d7J3+mRkDDaENf+g183+3swFSdqKA=; fh=WGPaBZ0VF90JlS+F2IwkaAAN8IpzdW586XSGqZVU0aw=; b=Do4sPDcbkoWuTFPZknm1I9eAFUDnvZ75y53ar0l5Zfm0/TdEFJCkwq+x2ORQ8/Tiem KBNNNCLc0QEGSgndCKYCOZS1p9I/xx4XXkhWX/l/hYX0RN9asuJ2VuTsbwo35LMzoTul 4i8YWqVx38utjCvXnR4YzePHyiCoVxypmnNUuN3GRlr5nLdt2+KxIkVfQkW1EEvttLVD E1+1G6wlA+jM9qB8GfEz94GxvYVXD/rt/ZWAZx9VtEVmOcxO9VYZBbqrblUjSoOZbkmq kF6t0ajG9KDjEk2Z7l7MRAPVl+clgOvxl4ARlQvTUobnAO7455FMh9crJbpUdjw9qdXF p70A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sDreQZTx; 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-47089-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47089-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; AJvYcCV5UBDdG2hjbzy5zo/B6I5YSYqoAI/RswGLuoFkqYGDlwQEyRX9zXcl0ABGk/xAEs4/7w05GdzOcAR9W0I/80wVGf45tsjDRGzgw9lPtA== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id g11-20020a05620a218b00b00783e29d715bsi10783266qka.769.2024.01.31.12.33.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 12:33:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47089-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sDreQZTx; 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-47089-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47089-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id E10091C22E53 for ; Wed, 31 Jan 2024 20:33:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6CA4839AC1; Wed, 31 Jan 2024 20:32:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="sDreQZTx" Received: from mail-yb1-f173.google.com (mail-yb1-f173.google.com [209.85.219.173]) (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 E4DD638FB5 for ; Wed, 31 Jan 2024 20:32:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706733144; cv=none; b=T4XGaiqZoOG6wQUX1S8jTpAUblWCzivn8XRTFnaxXFsjvP0XZa07bN/hCp4lONU3EcuOowKxA/GEtp4+yXDaafC2bXmp6w8NahKHzykmN6yTTQeDDuyzlp8B2lOU3TnrGcKMKlIWLlt960ZNlRy9+gJ3grKBFrKm6I1Idz5UKOg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706733144; c=relaxed/simple; bh=fkN7ecc9GY/Pf9d7J3+mRkDDaENf+g183+3swFSdqKA=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=ZblzkrQFrWaHKkyCYjovmBN5DigODfnwrjFA3QCXhPHBgGCYrOCO3n7NtmHGmQoykZKM/vr9kBhY7SDn5NN7L80TMzrsaroFfTWpCkqOGtk/54r1GnWH+dW2g9Kz+yRzWf3sLI2W/x1Y9BCR3HjuYSRkP3++zlrndtUHJrf8hj4= 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=sDreQZTx; arc=none smtp.client-ip=209.85.219.173 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-yb1-f173.google.com with SMTP id 3f1490d57ef6-dc22ade26d8so155351276.1 for ; Wed, 31 Jan 2024 12:32:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706733142; x=1707337942; 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=fkN7ecc9GY/Pf9d7J3+mRkDDaENf+g183+3swFSdqKA=; b=sDreQZTxi/spdYdhEQaxc3ATm7VIKNQPhAH3jjAJDlDJZwQDGsKYbq+rQkelsFrBE4 tsmW4z0WilEKBwKTCOxDjaMeuSNRJQNfKAeBqd8HMtMw2BUXlrkNg7L6DfwaBSO+GVc6 IuCnHlW1rzhhV+Gjdt25XYS6hfWffTRLEDXPayc6YxsacWftYl3UAK4f9ZcmuGUtOzvN 6anmhG/vigQXnqgksXcXi/yh6yzq53wlfKog1bEqmaRnoGLNmKyOMO6KRvVMyceXLiXn DDUHp7AcLdE0rZXCXBAnk8gsInTr6EddWA7gZuszBxVxvOoPQivuvvue1oxS6R1zrdmW 7PCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706733142; x=1707337942; 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=fkN7ecc9GY/Pf9d7J3+mRkDDaENf+g183+3swFSdqKA=; b=qVaCI96o/1lMD6ehiQBy3fA4KGgMhXJxfHq2QGFoMqSxVxyVSaK6W+bNBUzOlZCsBX iGbEfTmta8wNALNU7k//AOREOWvSpyfa6sNmiMXr/2I4aqt/NjW/2aJ54GaV+hfIwqTq dcBYlfoX1egQ9ZovMPPje3f+Q/QWYBhClgO8/kkZfsNwqPcXguaj35kAEVFIQ8tmjr58 pb5LAxnK9ckXq2BISn6XmgsXOmMMUC/6IA/VonxWL1wMGu0xzHOLnBGJ7PpUHcD7P7Ms Z56xb6JJAePjWwT1MiJgGskpbMmyChcn7CAyDrHFRq7K4hRRTATEpPwAUadNSEMUcu2k tV+Q== X-Gm-Message-State: AOJu0YwvDxRdQ1hNE6HasivSCTIpDTgWkO92kfhqcZYo4vupG99MTXMw 8DXMLJEV5MhOjgcqWk734zxdxsaSd98j2Us3mFYlTYNXEKLq+lb1ImN5oofhHicQQlihmEFvAzJ 0yX6+B2JA+GPdfzWGgkLgVR/ANym828jUbPsCvw== X-Received: by 2002:a5b:8c1:0:b0:dc6:cf93:c67d with SMTP id w1-20020a5b08c1000000b00dc6cf93c67dmr1376439ybq.39.1706733141960; Wed, 31 Jan 2024 12:32:21 -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> In-Reply-To: <20240130124828.14678-1-brgl@bgdev.pl> From: Linus Walleij Date: Wed, 31 Jan 2024 21:32:10 +0100 Message-ID: Subject: Re: [PATCH 00/22] gpio: rework locking and object life-time control 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: > We do NOT serialize all API callbacks. This means that provider callbacks > may be called simultaneously and GPIO drivers need to provide their own > locking if needed. This is on purpose. First: we only support exclusive > GPIO usage[1] so there's no risk of two drivers getting in each other's > way over the same GPIO. Second: with this series, we ensure enough > consistency to limit the chance of drivers or user-space users crashing > the kernel. With additional improvements in handling the flags field in > GPIO descriptors there's very little to gain, while bitbanging drivers > may care about the increased performance of going lockless. OK I read this before but didn't understand it, now I understand it. The series: Reviewed-by: Linus Walleij I think you should merge it all soon so we get some time to shake it out in linux-next, hopefully any remaining bugs and cleanups can be done in-tree. Excellent work, by the way. Yours, Linus Walleij