Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3224279pxb; Fri, 12 Feb 2021 12:27:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJyEJcxXssmzAzJS0lSvERWBNUaY0UlAkitNk4DjxYR2lBjtcpraV1mKAK8md1/DRRgZCL1y X-Received: by 2002:a17:906:17d5:: with SMTP id u21mr4786137eje.541.1613161649264; Fri, 12 Feb 2021 12:27:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613161649; cv=none; d=google.com; s=arc-20160816; b=A1cfkgfjHDu0DOC7lRZePLPNteqZt4HEq8lJr1wD6Q3cFpRqrKPlsk9Ivdo94z0Xj+ 7LoXpXnzLxDRsADoj5OKjHRG8+zucBs55HhjCWJ87KXUfgOXzpfoHSGrWu98GDgIDOZy uNOHrCGog+vujKENbJR2XsnxazoVZyNVroVTAf32+sBDgtfY+mQHnliWApimDX3W2CZy YhZeYJKDJ2R+z1RE/zaKPzCuLr8pDPKI0WeBjLabYQM+sVqhSL3HYMxSWgUzAXzhstoz KsZhx/l8xDKHWHccdtGlaA0KFXhRYRhzub5Hyiv+qHg5dr50f2MWYbwR9MT1uEunAQGi LWMw== 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=pS16VTzHbEOai57Xm4rsgqX+AxduS5RAVJ/hjGj5ReA=; b=tEpF54qGHVJ0LUtMIXhlW7B6JFx4v8VdhtjOK6PRK9OWYWcqFsYK/lRk1fdZkyTi8+ 7bhJMPz6T44sGAGG3jnQNCZdbHolguSH4nZlUvxK/8hghlVmgbtlIVRShbPVCihbl34Z dVqbL1+1zWIN/2Ut4I+nCJgcRYi/nenRWcD5Z5l9D3bIG7Z2CS+eAZqtlNeEqebzeJ3/ wUTQSqdtGFj68c6+FB1wyPepoj8yfpi/kTezdMXiT73NBrDUSeW6MVCO+npcaLhVC4gR flIT0W9z7sNoQSd3zhUtEuvsag7cKI1bqnKUAw+Z8lxDcpkXvZPmVOSsEhdPGRSsrvu1 +1/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bgpPQyf7; 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 kx25si6936970ejc.434.2021.02.12.12.27.06; Fri, 12 Feb 2021 12:27:29 -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=bgpPQyf7; 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 S230525AbhBLUYa (ORCPT + 99 others); Fri, 12 Feb 2021 15:24:30 -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-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-kernel@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