From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D33DC433DF for ; Wed, 24 Jun 2020 14:00:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ECCEE20724 for ; Wed, 24 Jun 2020 14:00:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="vUXMPXXq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390898AbgFXOA4 (ORCPT ); Wed, 24 Jun 2020 10:00:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389484AbgFXOAz (ORCPT ); Wed, 24 Jun 2020 10:00:55 -0400 Received: from mail-qv1-xf2c.google.com (mail-qv1-xf2c.google.com [IPv6:2607:f8b0:4864:20::f2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD098C061573 for ; Wed, 24 Jun 2020 07:00:54 -0700 (PDT) Received: by mail-qv1-xf2c.google.com with SMTP id a14so1064379qvq.6 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=HUoQuOAl1RyGHUwqsv71fwI1KvIWw7a9oUJSi3P5gGudNa7GeOFZsAd+a9k53a8Uvj Qx8KIPmbBZiIgSC/BQKoAeBUVm0EwPvPGexat5SXRBgc0t+ya1DdkxdbdyYOp/GGtkdl p/tkR96O8IK/ieBYgqgPGjHH4kg/guZKyyhiuQJc7rghUtnU/wWGLgVHtfHyRqida/jc Z3PoY8QXa6R8gg9kxDjbvfDNRWgrv1Wl6/GOAmgU994qV10jb79lq+6yXUYtbwPvH+Kq c6E2ly/062hggjMFRSK5GBCYq5tyIauXVSAxT96pFgpoWu2Xl87YwyUiYjrs9VDASut3 1egQ== X-Gm-Message-State: AOAM531AB7UQN7oGMkSYdOZJftRIqa6h3WckDwNTAKqz9ZX5EEi08jmt RSNytwu1hOE+1YEGYd/X/TRsCHbeg1nyO9NZ7uedjw== X-Google-Smtp-Source: ABdhPJwc+N7OLcgF2n6s7AYzvFq1sI6X0oMw7s/cuElNqvpPqyRyd7bBZnFfZ22kg8kVyDwekNyPWQtA2v0Bw1QGcu8= 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-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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