Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1316981ybt; Thu, 25 Jun 2020 03:11:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzLyRV1LQfjHBUYBwEqU1h8fC4G69frbATTZtYuW4cbmocIr1oDPwpnWEyyMdEJcMBzPqZ X-Received: by 2002:a17:906:d963:: with SMTP id rp3mr17513032ejb.54.1593079873143; Thu, 25 Jun 2020 03:11:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593079873; cv=none; d=google.com; s=arc-20160816; b=Ec6OPwf6NoPnKC4kyKHm6AswmXYlAaqV5JTia7wE8tyxJFkYlcavu75S36IuM4Q8wO bO51q0lNqn/L4kS8N1PczQ6RyyLGnJOU/sQZqzEb0bad0JU8cO1pajvst5UboNbY242c aUHFwcA17WxAvAO0s2El1+cQapFipDsgoeu36YSXwVSG3Z1L+RYcRtw6NvUHCX+m6ECv zwgOt/YOWL7Kmqj3sEQKJyFza5+bB56gdOk8c+1zvZAjrIvS0Dw/ofBIXvKatiO/B6qo Monxh1m4NOQR/jTJ3MqWtoXGs8Mgi8Wzl7CbyXZk4x1lAyWjvDjEvU4gF34ARoZxZoOM B0EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pbidNKZ88M/LeU43LgPuIuXUmOhI8ZLf9+XNKNcTndw=; b=uBbvWXnho7oBgaA9m6pzYmcnuDZmeOg3n1KsAJuCpgf0Lp1HWMYQzOAQx14gqCFWl7 ZprCmzRlrTn8S9aRfTaj5C0tQ/3Q4yqAcPODYB2vF2ZHyGAMwYaVlY7Fv1NJCgNg3/EW xrt3+nhUqHKtr69IPdi1ygTgA1TwPO2ZaSMvrqnoBw6Tj8IkCTSXNrbX24PXxvFTh5Lg lFqUVD9MEKjtR2BbVxi3fiJhymqtFMbejXIQHV1118lq9FDFGnyBxHdFIeWCZ1Quc+9K v2EI6OPfBZ8pczF5Tw2CkvVCwVVvgKQwShZUJE5bQgJC2xDRQRXGxnnFqBI3yChURz3j hUVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KPc8D+gj; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z9si14327413ejm.47.2020.06.25.03.10.49; Thu, 25 Jun 2020 03:11:13 -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=@gmail.com header.s=20161025 header.b=KPc8D+gj; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390807AbgFYKBe (ORCPT + 99 others); Thu, 25 Jun 2020 06:01:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390074AbgFYKBd (ORCPT ); Thu, 25 Jun 2020 06:01:33 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDA6EC061573; Thu, 25 Jun 2020 03:01:32 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id r18so3061797pgk.11; Thu, 25 Jun 2020 03:01:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=pbidNKZ88M/LeU43LgPuIuXUmOhI8ZLf9+XNKNcTndw=; b=KPc8D+gjjY/NuzdXHcww6DSdMuTKus4MMk7YixiSHESOBaCRB+gRjkgF2WM56PgIpl GX2bk32EqGYDyzDo3+3qUF416IWGjUeDZn7MYQ7OcX+4hDaVOu7bjIoV3kd/5xVmnOvq QYe1SRhGs4R8X4EQw8Um8PJ9imcjp651yCiAo6QRrDjAbziiQMb/rXB02zhsAiq2vgaN /Z1LBVIN0OhceYupzdgwK//ocTtG2zmI7tLtqhrpj+CkOnUF1Pkn8mfZJasJWuSqNHIo VLzE1HjRN6Dxhj8mwqdTp5SrzWc8DjdBHzxgrbNHzknkhE92Kbg7rZGbMgIRBiKfaLuS KP+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=pbidNKZ88M/LeU43LgPuIuXUmOhI8ZLf9+XNKNcTndw=; b=keD9EDkg1BXBBRjyhe86qJn3llQNhDalR/sUCIYO/J0nqmDAo64FvPrsgfIPLJmP1p s9O3IuDS46AozhhI26k+UWTKqOlcTYeM+ngWmomL0TmMWn3gK3BnsclAG+PI/oj1DDG2 OaG3KBvqkHI9QaDkEEVmo1bPncVV+vTtZKefRxIuTAVyIVgI2W3mWS53oFrc+07Zh2zv BWh6F+DmOXQRIQx4myoLTCx62dJDjHSWbWxhx2z8nZR8boo8aXxSW7Pj2K5SvV28rFaL XCAUynvmafRXuTsvFwT1B8fl1PTvMriCgZ8K+VtpYBu4ofSZZPdhR0QOmKy2b7r1kCAx xX2w== X-Gm-Message-State: AOAM531+nfDwVeYiIxn1CrLQkPNpNmyHLqI6JFJtEPNItCSyQDLHfvuW tvjv3If1ai+EKgXHoUklyRc= X-Received: by 2002:a63:29c8:: with SMTP id p191mr26534263pgp.333.1593079292321; Thu, 25 Jun 2020 03:01:32 -0700 (PDT) Received: from sol (220-235-108-194.dyn.iinet.net.au. [220.235.108.194]) by smtp.gmail.com with ESMTPSA id j2sm5103971pjy.1.2020.06.25.03.01.29 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Jun 2020 03:01:31 -0700 (PDT) Date: Thu, 25 Jun 2020 18:01:26 +0800 From: Kent Gibson To: Bartosz Golaszewski Cc: LKML , linux-gpio , Linus Walleij Subject: Re: [PATCH 08/22] gpiolib: cdev: complete the irq/thread timestamp handshake Message-ID: <20200625100126.GA18788@sol> References: <20200623040107.22270-1-warthog618@gmail.com> <20200623040107.22270-9-warthog618@gmail.com> <20200624140806.GA7569@sol> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) 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 11:44:30AM +0200, Bartosz Golaszewski wrote: > On Wed, Jun 24, 2020 at 4:08 PM Kent Gibson wrote: > > > > On Wed, Jun 24, 2020 at 04:00:42PM +0200, Bartosz Golaszewski wrote: > > > wt., 23 cze 2020 o 06:02 Kent Gibson napisaƂ(a): [ snip ] > > > > I'm not totally sure myself, as my understanding of how interrupts are > > 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? > 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? Cheers, Kent.