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=-6.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 97526C433E0 for ; Fri, 12 Feb 2021 20:24:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5DECA64E92 for ; Fri, 12 Feb 2021 20:24:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231327AbhBLUY0 (ORCPT ); Fri, 12 Feb 2021 15:24:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:52516 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231293AbhBLUYU (ORCPT ); Fri, 12 Feb 2021 15:24:20 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B0A7B64E95; Fri, 12 Feb 2021 20:23:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1613161419; bh=SgpeauIjBEYBb19bzKlcu3o1aZnQbA7DQQyuDGnV+uw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=bgpPQyf79qdr95if+5Dmg8ElIx9DuTNkhPqEWCY8ykckc5CIjK6dnlop9hrIluch8 DKhZL6ZTZNmP05P+g2Zf+Kl2bTeTmmfFjEH/RYKDC5C4SacpQIeq7nbwD5Yq8Vefwi AVuAgmifzPrYjUp/fvJsYXTv8g/pTHVxFAtx/Ru605wde12aZtW5srazgdj/R9UJjR ukh4jqCH+m4tljEHjSGbXoYp2k1CEUVqKUTDATxLgMLsWqE+0pTA067gadqaclshbx ZkWzPB86j/7fx3VmtF97IDcKTrH5JqWZT4TCIf4FUwqo3kJRVwv62Jx2N1E9rRcrg3 0AhPRQx7BUNSQ== Received: by mail-oo1-f45.google.com with SMTP id i11so135158oov.13; Fri, 12 Feb 2021 12:23:39 -0800 (PST) X-Gm-Message-State: AOAM531PJwx9yJ/nJJWdnJAjn0+rqfA27ZodRd9a7fxxk8b+dTuO36l/ bI4hOUsWK/i3lIy+VnLDHoeURLXxa4aPvQBlVDk= X-Google-Smtp-Source: ABdhPJwMNy7Be51JAAzOcVXxyMadWUxZgfu2ogN/4Rpg2m9kmLt37KCPrT5+zVNmI6BrFLJtsLdm+NGVC0q+89FH2u4= X-Received: by 2002:a4a:88c9:: with SMTP id q9mr3261535ooh.26.1613161418961; Fri, 12 Feb 2021 12:23:38 -0800 (PST) MIME-Version: 1.0 References: <1612774577-55943-1-git-send-email-luojiaxing@huawei.com> <1612774577-55943-2-git-send-email-luojiaxing@huawei.com> <2a12cf7a21f74a0c9e2552a467b77fae@hisilicon.com> <33720e72-a438-8ffe-1b5f-38756738ad9b@ti.com> In-Reply-To: <33720e72-a438-8ffe-1b5f-38756738ad9b@ti.com> From: Arnd Bergmann Date: Fri, 12 Feb 2021 21:23:23 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [Linuxarm] Re: [PATCH for next v1 1/2] gpio: omap: Replace raw_spin_lock_irqsave with raw_spin_lock in omap_gpio_irq_handler() To: Grygorii Strashko Cc: "Song Bao Hua (Barry Song)" , Andy Shevchenko , luojiaxing , Linus Walleij , Santosh Shilimkar , Kevin Hilman , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" , "linuxarm@openeuler.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Fri, Feb 12, 2021 at 12:53 PM Grygorii Strashko wrote: > > The worst RT case I can imagine is when gpio API is still called from hard IRQ context by some > other device driver - some toggling for example. > Note. RT or "threadirqs" does not mean gpiochip become sleepable. > > In this case: > threaded handler > raw_spin_lock > IRQ from other device > hard_irq handler > gpiod_x() > raw_spin_lock_irqsave() -- oops > Good point, I had missed the fact that drivers can call gpio functions from hardirq context when I replied earlier, gpio is clearly special here. Arnd