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 64877C433DB for ; Fri, 12 Feb 2021 09:46:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0A4ED64E38 for ; Fri, 12 Feb 2021 09:46:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230204AbhBLJqS (ORCPT ); Fri, 12 Feb 2021 04:46:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:43592 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbhBLJqK (ORCPT ); Fri, 12 Feb 2021 04:46:10 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B2ADF64E77 for ; Fri, 12 Feb 2021 09:45:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1613123128; bh=BbEhXej3UDqv6ywrb7c2WICTBWGHFl7FT92DDfTe4YU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=tS20NBgYQIoH115aNkqNxzaqAG3B5nWvML0gh99ZTG8BZ0n6WXKgKpu1n1ceD1HbI 6HQXdSwYVPkRsRUqoKPJxJcN+VEdUr+y3CGIaQ/JImFgBjmM5ClhBqHU2/106IqY6i bc+PwHRSkgn7EKx+T1RIhj7VeQ5jJdIBXIMxJKFXLUiiOPdW0oH8Y8Zo2d1E+QLJKB wuL6+iwunPOXlgi7mu1jl3uG/WP+M/dFOgwPt8Ra6MGzXjg6b2C8pU4RL4+OKgfBce ttj2uAD0V8cs1BimVjUYeKXgmeK4gDJCDQr7XLDpCyrff3khYvr/kkh5S3cIdu12fN ZmbNS8u/XTqLg== Received: by mail-oi1-f173.google.com with SMTP id d20so9349715oiw.10 for ; Fri, 12 Feb 2021 01:45:28 -0800 (PST) X-Gm-Message-State: AOAM531QgZTmkNC70DVlCIn2Z0VRe5wc/TICaP1LrkHiBYg75Rep31cg 1bi3nMmbL804p1uIBCpjxiOD8CHZ8b7qSEOerhs= X-Google-Smtp-Source: ABdhPJzD5e6QclZTBQwRsZoRCLLpZYukyOSqBEinruy8DlGlhxaUvUSfA98nK6oNeB0RIfdhYI9xQOfnExujeCY4C9Y= X-Received: by 2002:aca:2117:: with SMTP id 23mr1286794oiz.4.1613123128011; Fri, 12 Feb 2021 01:45:28 -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> In-Reply-To: From: Arnd Bergmann Date: Fri, 12 Feb 2021 10:45:12 +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: "Song Bao Hua (Barry Song)" Cc: Grygorii Strashko , luojiaxing , Linus Walleij , Andy Shevchenko , Andy Shevchenko , 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-kernel@vger.kernel.org On Fri, Feb 12, 2021 at 6:05 AM Song Bao Hua (Barry Song) wrote: > > -----Original Message----- > > > > Note. there is also generic_handle_irq() call inside. > > So generic_handle_irq() is not safe to run in thread thus requires > an interrupt-disabled environment to run? If so, I'd rather this > irqsave moved into generic_handle_irq() rather than asking everyone > calling it to do irqsave. In a preempt-rt kernel, interrupts are run in task context, so they clearly should not be called with interrupts disabled, that would defeat the purpose of making them preemptible. generic_handle_irq() does need to run with in_irq()==true though, but this should be set by the caller of the gpiochip's handler, and it is not set by raw_spin_lock_irqsave(). Arnd