Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1596310rdb; Wed, 20 Sep 2023 13:50:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH519EYWS9C4kOAOEL8CwGqHKhWA0ubGcrY4DUA5T9kgBDCjDU6adO2eB+99k3mMBfc4Lfe X-Received: by 2002:aa7:930c:0:b0:68e:369b:a123 with SMTP id cz12-20020aa7930c000000b0068e369ba123mr3758165pfb.1.1695243032081; Wed, 20 Sep 2023 13:50:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695243032; cv=none; d=google.com; s=arc-20160816; b=qPgEL6fCDxD3YHbUyXbm9dV6vDbM6yJ5FUwziB5EcvkwnkDb0jLLVJXzJzoddQa+75 MPkkq/URhScT3ch+kYVm/46ZHOEDyrIfnRKkXPOpR+F8YvyshHOmSKnlMQFX7N9Jfdw8 RUNUVlC1yt1+EFdpJIzcw36wcmD/fJw4aEXqb2LygVoHsf21LU+AqUqf+ibbOTwj8aZf kx9iLg4uxzen2E4LobKdHta3RDnue1Nq7ySJQ9twVEU44cRc17S2dgREFIJMwWE/g2C8 EbdsnXprKlDFX3gLyxxKQ4UYsP3yt8GFpBPsNVcNt5VVZA79FRx2l46oGFC3yRVut7jr zHjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=GzQdLX4ffzjkMw7jYkFd27ktsvPZM4GAQ9T3XI7VcZU=; fh=ZCbnr9gO+hyRsVYSYNC1zobm4/NcYBDlrs9F3jIrpX0=; b=RAZWcQHeEy/GpG3OXsXi7G/2AJXyHP/lwcPyYLv4QpQ5v+VmQarhoN5pxCa1lFifGM QY8nRJ3n1o22Rvi0BKN7Z+1Ivy7xHJgymxpw+A2EKJsFyscpPHA1aX8tVnkWHCF8aarh 0LutP/DYum773fdoqSJtRP0h9nVEaw2lSBWFWHyxQuwfhUJn6RalzDHFwHwBUfU3HcsI KJ4fHUCEkqeGz2/I4Kj+5NdKyqwYRFfAdbQ+gu2X2G3jjGac3U9y6zTWfoHogaXLtim0 PXoDOIUKsyyetrW33GKUluX4npObvDx6zXDr8N6vXjp5NciE6dlqZLtQKLQr/zk1Ik+N iySA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zhuY7guS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id u1-20020a056a00158100b00690d255b5a7si102461pfk.45.2023.09.20.13.50.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 13:50:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zhuY7guS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id C1DC482972E9; Wed, 20 Sep 2023 03:59:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233727AbjITK7R (ORCPT + 99 others); Wed, 20 Sep 2023 06:59:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233125AbjITK7Q (ORCPT ); Wed, 20 Sep 2023 06:59:16 -0400 Received: from mail-yw1-x112b.google.com (mail-yw1-x112b.google.com [IPv6:2607:f8b0:4864:20::112b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA26897 for ; Wed, 20 Sep 2023 03:59:10 -0700 (PDT) Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-59bcd927b45so70466607b3.1 for ; Wed, 20 Sep 2023 03:59:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695207550; x=1695812350; 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=GzQdLX4ffzjkMw7jYkFd27ktsvPZM4GAQ9T3XI7VcZU=; b=zhuY7guSt+OZ8Wm4Ymdd2musO6cTkfi7sJuee/VvkyzZyAlHIred7RV8G2S7r3p1Lx 4+1bYW5RwDtrM8iSRdq8EqOlnoFl1s6eoX0VGunFZsjoovnZ6AfpmqXh17nupkPi9KFN 7HkpanmRaudaMZC78/HeNGT62qa4ae2Oco3J+hNyMD0G3aSMwWsVvmAwLaichyJXZ7af jysrWqyfWlUwHm81McNfGyVtbCfizbM+Fecd2w0O0Ip7Ey8IuC4Ru29YmWPKGBBPNFGe oCS08mkD5lfKS/JBlZVYB+tVPSwNjuCD6LytrjGRIfPZELDYdhxtgndHjpqYxwPrrbmn 0dmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695207550; x=1695812350; 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=GzQdLX4ffzjkMw7jYkFd27ktsvPZM4GAQ9T3XI7VcZU=; b=QNxRlu63ryLB2YpmF9R/YyB6bi/nUWcfUNniRnZtptgBF91NB9n5JiFNfjAoOfGYkH Ogi5oYO1EgJdWGzskcNUcNUKtXSd7BraJb83RWA9GX8zfYbiZOQt9ocOyiP7o5eY8N4i VDI4o5qS5ah+1ZcED9zwaauBa2yjGVzDLGe3VDDdIZDEKS5t3wSRmBftlL4+jedm/4CI rmcQVV2i3s8ONDzUuBtSLZI4ZabRlD4LwxtDPwK5FUf/OFsDmkYnFNtIYVFW7zINf5wV Nl59BIjSagckLEYDlC96lEs693NzGKzCoQz1nBiqIQrQ8OdWx6eqTt5DDvDOoIxOMAHa 1wug== X-Gm-Message-State: AOJu0YzBLv+iPZbGOXEF0nuEhQ4O8CZ5Dg8n3emhiWPU0gPOu76zi3ek Pvg62EHimjanbD5LcAhKR9YZ4Ukvq/L77GzDgU+ZEA== X-Received: by 2002:a81:6542:0:b0:58c:4ec6:f21e with SMTP id z63-20020a816542000000b0058c4ec6f21emr2230919ywb.23.1695207550124; Wed, 20 Sep 2023 03:59:10 -0700 (PDT) MIME-Version: 1.0 References: <20230920085639.152441-1-brgl@bgdev.pl> In-Reply-To: From: Linus Walleij Date: Wed, 20 Sep 2023 12:58:58 +0200 Message-ID: Subject: Re: [PATCH] gpiolib: extend the critical sections of lookup tables To: Bartosz Golaszewski Cc: Andy Shevchenko , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 20 Sep 2023 03:59:16 -0700 (PDT) On Wed, Sep 20, 2023 at 11:33=E2=80=AFAM Bartosz Golaszewski wrote: > On Wed, 20 Sep 2023 11:12:58 +0200, Linus Walleij > said: > > On Wed, Sep 20, 2023 at 10:56=E2=80=AFAM Bartosz Golaszewski wrote: > > Can we rename this function gpiod_find_lookup_table_locked() > > as per precedents in the kernel, to indicate that it needs to be > > called with a lock held? > > > > I think you mean gpiod_find_lookup_table_unlocked() as with this change i= t > will no longer take the lock? I think the pattern is the one I indicated: *_locked() means the function is to be called with the appropriate lock held, cf arch/arm64/kvm/hyp/nvhe/mm.c pkvm_create_mappings() takes a lock and then calls pkvm_create_mappings_locked() which even asserts that the lock is held. Yours, Linus Walleij