Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2812250pxb; Fri, 12 Feb 2021 01:47:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJzHxtwB22lW/cDbPwofpMZFmThAS2Zq0K2sTcRzht/XvTxpFMM4iJuFijL1u9EA0VRjF3NE X-Received: by 2002:a17:906:da1e:: with SMTP id fi30mr2118658ejb.151.1613123245066; Fri, 12 Feb 2021 01:47:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613123245; cv=none; d=google.com; s=arc-20160816; b=hQk7AU71yX9jeX/BPRnotp9efPbnoliQUIxKqDNPZPV3UF82tjja45cNDWuzV4wRvH l0+JtU80To4zcVvbinNt/GG9+pM9r0HycLFal/L6uvwfz6YBICA4BuLKo2G/NZReuTXV JHDeUox858jsGxIjwg8nsYFKXljb5/+KON6Yg2xMoGKjUHdq4irow80m41OVuPDLIVCP LyxaMXQ6ow0eghw3vUxPzF/lQa7LKIu5E16kmBh76MISWejwAwZJX5piuMvXKskYz3+Q 19XlRTqgURI8tQGTs899jEIv+xd63M480x9ji/J8KDP6V/8JB2CHpYOJck5u7CgV7OeI WJzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Nwmt8rYL6h8adh60fEvLsiXwmTOv3ajVG20K3WoW17E=; b=nachS+oe1HsyEk8AVyx7XzsALnuCb1aU80U4uOSXuPY6vAYAgCBndpg4qCTHKVDGjP vpAu0KUVUixois+ZUxTzuVzjGtJrBAutnIeortI5OuS4uVuDomnIeD6Bj+7KtcensZgG RAxORW0/w3MInu6xnwvryCQN/QaeFpFxd8C5u8ck2Mm+Suv6EC9I3lVIh9PP3nC4IPS9 RhdebdbGj1lLoIqeTR0wQhzEWJEmogkMn73+JfuZMOcLN2FWxsxjIfNCu1qVQtB2pk/p UZAZy6rsDlcIgLtJ8eNiRyxcpKFRrn79CbaVItJYyOeAuNtCI2fUaoiBgeANMXBrmzIK v3Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tS20NBgY; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s7si5890751edw.598.2021.02.12.01.47.01; Fri, 12 Feb 2021 01:47:25 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=tS20NBgY; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230144AbhBLJqQ (ORCPT + 99 others); Fri, 12 Feb 2021 04:46:16 -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-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