Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp609247ybt; Wed, 24 Jun 2020 07:04:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYteQjIhV5Aq2JKUHqnDdT6r9cSdSN/pVdvmaiEF9D4DJTqku5X+UfO6C6QKdmkmELhUZe X-Received: by 2002:a17:906:abca:: with SMTP id kq10mr26223711ejb.390.1593007497224; Wed, 24 Jun 2020 07:04:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593007497; cv=none; d=google.com; s=arc-20160816; b=aDEsx/W0ZkPaNMg6yJwxYSGwA9iloY1O1foY8DOtLBOc8ZoZB9Kp5Bbfqj6pUqZO+k 7xMosFyeb19K0EDMgAYT+eG6AsBQPoRydNNodZbUqL27jmZx1tbyRQEHPnHW2VIizupC NtJznUYqNEnMr5wzKyL4LzNtu9IJ1m8/sCx072JyQg9rj1F4FqxsqPq71mlQ++T79qKE ROQL+HQRBu/GGCxrGaRf9rH1t1jr7Mka21sMQj7sSBLP8ys+OdBlHTl2nJuJbMN36W8m fYV3lBYFBfUp331Cxn1cEuvREDH0JT01ZX9zFepTJjWgSES4dU6ZbS3RBNK1FLm/ZaeD +Gow== 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=IHUFmFa+PERILwSWl+mXNut/vkPHclyZKqXAUx/99u4=; b=leMZ+Eg94Ez6dzzs37gt6Dnj81B/uF/GOMGyugd2y5Ag6bLubEyPYBdRFENszfVC7K 8ebWxXfsG0BysyFikapzgi3awIZ1eWzNydCihZwdsjIkHNrXAkaQr3ou7KdmrGGt3KFO dMy3PvOVF7LLMaMk7nCrECEKFa4FCduOPPzLH4sdvyo6FMTOH9DgcbV+hvYrtvpibokR iTx5atzbdVKaLYTdPGunMdIyVasNgYGmJ8BJCS+Llw9aWCS7HpcUrNDGmV7whHadF2bV ndqi1abfbyu7XiB5Cynudjvlcs8A1p8Htv+k7d2q6tiwuDo+u4ImIB2ZmDDM0qydRItD Lxmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=vUXMPXXq; 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 c2si6637549edf.278.2020.06.24.07.04.32; Wed, 24 Jun 2020 07:04:57 -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=vUXMPXXq; 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 S2404006AbgFXOA4 (ORCPT + 99 others); Wed, 24 Jun 2020 10:00:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389668AbgFXOA4 (ORCPT ); Wed, 24 Jun 2020 10:00:56 -0400 Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4A96C0613ED for ; Wed, 24 Jun 2020 07:00:54 -0700 (PDT) Received: by mail-qv1-xf2a.google.com with SMTP id t7so1051833qvl.8 for ; Wed, 24 Jun 2020 07:00:54 -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=IHUFmFa+PERILwSWl+mXNut/vkPHclyZKqXAUx/99u4=; b=vUXMPXXq8Zw5TkXeHV4MZ7HPDHkvugAyM9PvNdF5sQ0X9X/y5xDdWI0eOuPqS9MLRn CLyTd3RTJJNfD4ec/t+xppt3SM7P8qheiP/tZ+l+UuSAT84i4lRyFqJfXzMHRxi9yLZx TL+WEvKnvzFFvzHsiJ3ttZaNdkHPMx6wwlC9ZmOT+DExbI4IKVdGCBvgNw0CE7Df9Urb fsKb4LetTAWs0d6WH6QufVofUMmr61BnGKBY3PbwlSdEEMY8OuMN7bEWxCd0INJH3zs3 8kXkqXAjOZEoggqsXGkYBXFf/TFyobF1d76m++X/tO2QWZogFrKqMq1S8uI1P3/XZOpc ymcw== 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=IHUFmFa+PERILwSWl+mXNut/vkPHclyZKqXAUx/99u4=; b=HLJpbcS0OBRJPqCLvvCTo/zjlhLidpMZfzb+WH0pG4/IGXWSpE1fM+tVGN4IW9qCGI 4tq9+5MrPIWNWIMK924/k+vjRVycM1M36noqehfSf1u/n+7kDv2cswdOTcvvtoFFlR56 vCwGb7Q3bProNkyQI7PCQQl682x/bJLln++2bma+EUEmiCyHtyqDoyyf4rzXxNOv/dny t5MMf08jqLZE8Bg8OSDD2Ljpoo/SzeCXs43i1U7hmJWkzP2eqylCD7WcWLmhaZQJGB9f jqU5FfsTnAIJMLwFuxm3XH/AwdONryOhppUpTPLQ/hTMfQgQkkpUwpbcPUpcK2jNPmvi 0PaA== X-Gm-Message-State: AOAM533qdnB5WHOgqT6DvzfEYwILdvaXO7cLVoxvzR21WfVe3ZIE++/Q mlQGsne32sUXo5KSyf0xVsl7mjTVcw/LLbvByoznapHi X-Received: by 2002:ad4:55b4:: with SMTP id f20mr30749529qvx.148.1593007253628; Wed, 24 Jun 2020 07:00:53 -0700 (PDT) MIME-Version: 1.0 References: <20200623040107.22270-1-warthog618@gmail.com> <20200623040107.22270-9-warthog618@gmail.com> In-Reply-To: <20200623040107.22270-9-warthog618@gmail.com> From: Bartosz Golaszewski Date: Wed, 24 Jun 2020 16:00:42 +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 wt., 23 cze 2020 o 06:02 Kent Gibson napisa=C5=82(a)= : > > Reset the timestamp field to 0 after using it in lineevent_irq_thread. > > The timestamp is set by lineevent_irq_handler and is tested by > lineevent_irq_thread to determine if it is called from a nested theaded > interrupt. > lineevent_irq_thread is assuming that the nested, or otherwise, status > of the IRQ is static, i.e. it is either always nested or never nested. > This change removes that assumption, resetting the timestamp so it can > be re-used to determine the nested state of subsequent interrupts. > > Signed-off-by: Kent Gibson > This change makes sense to me but I'm having a hard time processing the explanation. If we're requesting the interrupt and allocating the lineevent state in the same function - how can we run into a situation here the status of the irq would change like what you describe? Bart