Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3423478ybt; Tue, 30 Jun 2020 02:21:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoQqR3x8bH0a8PCP8gjTYTJSZGYzzPsY2u2qU9fFLUaR2cuq/kY5LKRldv0iNOPrr/opBv X-Received: by 2002:a17:906:3650:: with SMTP id r16mr16783697ejb.465.1593508912549; Tue, 30 Jun 2020 02:21:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593508912; cv=none; d=google.com; s=arc-20160816; b=nTmVmeNvrJAk+liyEldpIeqdShkypX54g6+6gSEMwc6S8sCQNptBGnlA/mi4KItZHd FkZhf3VSr6Tcu7HPiorvmFs+CiTw5dKB9snZp+7dL5FGWvP+MeS5WVM9lrrLnlhLpXTA Cpblk2CEMup2Qq5rEEheyCu8h38CMEZjU8nEHG1krOSb/BC9kC5+vi86r/bxw0ChQuHe 0hzhysUoEFtEZKuj6Ne/8W9fhER0xoX4334w/q3DoydMGMOhB1eDSP4n6sW37bd1aHkd KA6s+HPQQyx5tvr6khIBnIm9pwSTshPs2EkKtIGx+HcVgB6s0YFb4xgJOKRWQPik0AL9 ctZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=iK9bZflbG08ihQjRVcnie/mycSORKVkiSD9rdxO2fhk=; b=qpdvh6RjG0w9ZRJwtSksRl7K1zn8uvQMFH4Gy0qkoR5UdTrVyRcZepZag5sR3+kyjd DaxzJU0PBwLSAfaaytm7uJbdltPEHMrNYDKT7NX9wjiKgE6i5nky9EA2SQqCtavXGF0m 0upmMUS11JpXh6Qkl9dmjGYCYnQ2zyKcJLnZL5Jhk6uPHz6C4A5XlgANiNxhLk6ykVeL sthzk3yVEx0+b9dDhwKfyFS/99WekrYelNNqMJ4/5q+5tjyeTr1VW2XsZOGGApXxK9Jz IChjz4yQIKbODFdKMVVw/Z75riggYDy1XAiQWe2gI4eRllVIwFft1m2hYEz7HU50njXb wa+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=g6H5Mkbt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bx21si1349742ejc.644.2020.06.30.02.21.29; Tue, 30 Jun 2020 02:21:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=g6H5Mkbt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731892AbgF3JIv (ORCPT + 99 others); Tue, 30 Jun 2020 05:08:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731786AbgF3JIt (ORCPT ); Tue, 30 Jun 2020 05:08:49 -0400 Received: from mail-qv1-xf42.google.com (mail-qv1-xf42.google.com [IPv6:2607:f8b0:4864:20::f42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 111A1C061755 for ; Tue, 30 Jun 2020 02:08:49 -0700 (PDT) Received: by mail-qv1-xf42.google.com with SMTP id d12so8956452qvn.0 for ; Tue, 30 Jun 2020 02:08:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=iK9bZflbG08ihQjRVcnie/mycSORKVkiSD9rdxO2fhk=; b=g6H5Mkbt5DNNC4mpM8Ol5Sb2XFAAVgz7dk+QHwtFzZVZNmtS7nCKUPcrX84jfbcdBE bUo/rHlBN4uFQuSRpShN17WBsTptjwVuG2PZBnqmo8xAyRdilDLUY/3lfIpU4iAhaqot Xy9y/J6p7X0nQNFcJ+aahou+oeMcbuaSI7EfivxPYsakS5wa329R/bHCeCgoOR0ra7vr xkJStDT3T984WOH8KXYf+jsirAHOCixX5rRq6veMsAQ5K5xjNLkXMVQOkpS/uSirKP0u 5schmfSp19lHLwXGCMWiW9MlF6yGg0zUDoZtN64aUyRoZpPspbkRrVL5TLjCA0YZLvyA JRmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=iK9bZflbG08ihQjRVcnie/mycSORKVkiSD9rdxO2fhk=; b=QbNZvnvCAkGCGbbC9sfmTW+/r6uTB1w7LlEeb7bMzCav25P6okWr1gzZR29pRhY3Ys KTbr3eb65VGlts/xesopaoBAKs6OBHcI9sD1aCSOQeOKGnHKrgHzOuWJxiv6c8feWCMW h6H8/zr9sDfLxzLhxEuFNSMCxlsD9clJxpBx+zkN+bGAseqKi+oRBoeHKsuaqnseCL3x UUc7uVTLoMZxF4TtGS9IE3kr4j59BVA4EF+uE2CC86kJosBlqz+vzwMWl9KM0pVq+R+q PRigqBJtXsQxc4ZK1y9e96NTV6CHDLFrOmeEShabP2+MIAfKDLevvhQgvjeRsKlXYKh0 fNmw== X-Gm-Message-State: AOAM531osuplQPYCFPJmTpsdHhNUoUSRrcZxGK6V3kPLyJ4tIWBwztpI aHRvQps8vNupSJ40x89vvDGd+SOhYPVfuovzq5jXLA== X-Received: by 2002:a0c:bd15:: with SMTP id m21mr19505914qvg.61.1593508128336; Tue, 30 Jun 2020 02:08:48 -0700 (PDT) MIME-Version: 1.0 References: <20200623040107.22270-1-warthog618@gmail.com> <20200623040107.22270-9-warthog618@gmail.com> <20200624140806.GA7569@sol> <20200625100126.GA18788@sol> In-Reply-To: <20200625100126.GA18788@sol> From: Bartosz Golaszewski Date: Tue, 30 Jun 2020 11:08:37 +0200 Message-ID: Subject: Re: [PATCH 08/22] gpiolib: cdev: complete the irq/thread timestamp handshake To: Kent Gibson Cc: LKML , linux-gpio , Linus Walleij Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 25, 2020 at 12:01 PM Kent Gibson wrote: > > On Thu, Jun 25, 2020 at 11:44:30AM +0200, Bartosz Golaszewski wrote: > > On Wed, Jun 24, 2020 at 4:08 PM Kent Gibson wrot= e: > > > > > > On Wed, Jun 24, 2020 at 04:00:42PM +0200, Bartosz Golaszewski wrote: > > > > wt., 23 cze 2020 o 06:02 Kent Gibson napisa= =C5=82(a): > [ snip ] > > > > > > I'm not totally sure myself, as my understanding of how interrupts ar= e > > > shared in the kernel is pretty sketchy, but my concern is that if we > > > are sharing the irq then whoever we are sharing with may release the = irq > > > and we go from nested to unnested. Or vice versa. Not sure if that = is > > > valid, but that was my concern, and it seemed like a minor change to > > > cover it just in case. > > > > > > > It's my understanding that a shared interrupt must be explicitly > > requested as shared by all previous users or request_irq() will fail. > > In this case: we call request_threaded_irq() without the IRQF_SHARED > > flag so it's never a shared interrupt. Even if someone previously > > requested it as shared - our call will simply fail. > > > > OK. Is there a reason not to share the interrupt? > If nobody requested this yet, I'd say: let's not touch it. :) In theory, we check if the line state changed so we should be fine but in practice this sounds like a can of worms. That being said: I don't have a reason not to do it. Just a feeling. > > I still think that resetting the timestamp is fine because it's not > > being set to 0 in hardirq context. We just need a different > > explanation. > > > > Or just drop it? Yes, I think dropping this patch for now is fine. Bart