Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp6358543pxb; Thu, 27 Jan 2022 12:03:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxVDJy/VeTzzlJdxekPtKURKqq92Syy9C10R9v3sU4q0qUKalRSh/zvRWGJjlFIMKNFZQv X-Received: by 2002:a05:6a00:1daa:: with SMTP id z42mr4675371pfw.49.1643313804018; Thu, 27 Jan 2022 12:03:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643313804; cv=none; d=google.com; s=arc-20160816; b=dWY938JBpTdYsYeMyICSauYwvaasKQXJUsZnU4f1zIdeF1nlvQcoIPAh8bDsWluSyO OBLFGcnY1YKqd61SmVv4Hb66WkRVQTtLtew0AzY7qqxeTfaMT9dCuzlyJsNGlZufxDpe jI7YuqRDh+ei3E68eF9i52mPrkOkVk0ocqBldLrZXhR3HqOcZUkdBfLoU423iTC9MMut Fx2FnUDmq8gL0H4KE8vtdJUE5/E6bvxvsigQLFqWeQCF5D3g5P+TOyOEe7gBbDq0GCMK jXXrV+tU85GTOj34Av1rRU8r4HztRZU3eV9BgHihtsbdkw1EYnZlOaGnQi2auQNppmD3 D/Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :dkim-signature:from; bh=mdXbjf5exzj4qjWggjzoRlNPppEuZE9HQrfbD7rSuLU=; b=bXijdAKa4purY1dZsMVaGwiOIKtcTyp/muXouoAOgrXU63eAXJNwwq2vGjzQgG5qPt jJ8eo9wmXMwwFboa9w0FLm+BV5UWZUVTrguWi8D1RjkRUH57kKjViVNhdtLwZlFMv3q1 3RCQ6x4O+3g2tA9SyrwE2cM3U/SMozYpG+9K26fsZU5rHbtqgkUllHTkyBFfKH5ReZpm BG5+VlpqBy+EDddrXlr4QsKyqyExhLOmxaimhZywKZ6wnikiRaMuJo4mpcHDbmvunkZf GpVu4PlLjflbuH5rcbKfhXhD9EO6HP98nPeZA9SYf3Hp/YPMHLlrsk2J45H1HPDqkciD Lmiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ElIzE27z; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o6si3305914plg.356.2022.01.27.12.03.04; Thu, 27 Jan 2022 12:03:24 -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=@linutronix.de header.s=2020 header.b=ElIzE27z; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240656AbiA0Ld3 (ORCPT + 99 others); Thu, 27 Jan 2022 06:33:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240489AbiA0LdT (ORCPT ); Thu, 27 Jan 2022 06:33:19 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B607DC06173B; Thu, 27 Jan 2022 03:33:18 -0800 (PST) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1643283196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mdXbjf5exzj4qjWggjzoRlNPppEuZE9HQrfbD7rSuLU=; b=ElIzE27zcQfxOq6XUcg8wn23LhZPMwnYzeGt6etK8Qq7N/u2ZVZpmyYA6Zp+2tj3uVqpM3 RZr4PNurQ1xLvJ75g3hwzBm7A4kE14AxtASJPLJqi2+ftEEMu5Er3OWQ2+/S4yx+FVdzMJ YgrlTt7zXNCXLggwXGd21PH4iMLF9ukD/pT5F1OrE4eaZRdPeSYhXowVrLL/4PmdmtHuMp SqEkAUyXQfhtHCL6cg7xdGAcYNifHlHiYeFc+5KcEFgYVFn3f5uEHzmHYy8hVKXr4OrcOw 3EesK4sXPuIUSGa40pidB29wESqxM63JUWyp3PqcES4A1TVugkUz/7I3I9xJHg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1643283196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mdXbjf5exzj4qjWggjzoRlNPppEuZE9HQrfbD7rSuLU=; b=P0RhWZlFbDp7wN/7Qcwenaa+byqN1uy1RIOfwsdz0tEi+xHf/UecG7A0uC6xjqKu/xiN37 p2pmZ2mJq6UZc1Cg== To: greybus-dev@lists.linaro.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, linux-usb@vger.kernel.org, netdev@vger.kernel.org Cc: "David S. Miller" , Alex Elder , Arnd Bergmann , Greg Kroah-Hartman , Hans de Goede , Jakub Kicinski , Johan Hovold , Lee Jones , Rui Miguel Silva , Thomas Gleixner , UNGLinuxDriver@microchip.com, Wolfram Sang , Woojung Huh , Sebastian Andrzej Siewior Subject: [PATCH 4/7] mfd: hi6421-spmi-pmic: Use generic_handle_irq_safe(). Date: Thu, 27 Jan 2022 12:33:00 +0100 Message-Id: <20220127113303.3012207-5-bigeasy@linutronix.de> In-Reply-To: <20220127113303.3012207-1-bigeasy@linutronix.de> References: <20220127113303.3012207-1-bigeasy@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org generic_handle_irq() is invoked from a regular interrupt service routing. This handler will become a forced-threaded handler on PREEMPT_RT and will be invoked with enabled interrupts. The generic_handle_irq() must be invoked with disabled interrupts in order to avoid deadlocks. Instead of manually disabling interrupts before invoking use generic_handle_irq() which can be invoked with enabled and disabled interrupts. Signed-off-by: Sebastian Andrzej Siewior --- drivers/misc/hi6421v600-irq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/misc/hi6421v600-irq.c b/drivers/misc/hi6421v600-irq.c index 1c763796cf1fa..caa3de37698b0 100644 --- a/drivers/misc/hi6421v600-irq.c +++ b/drivers/misc/hi6421v600-irq.c @@ -117,8 +117,8 @@ static irqreturn_t hi6421v600_irq_handler(int irq, void= *__priv) * If both powerkey down and up IRQs are received, * handle them at the right order */ - generic_handle_irq(priv->irqs[POWERKEY_DOWN]); - generic_handle_irq(priv->irqs[POWERKEY_UP]); + generic_handle_irq_safe(priv->irqs[POWERKEY_DOWN]); + generic_handle_irq_safe(priv->irqs[POWERKEY_UP]); pending &=3D ~HISI_IRQ_POWERKEY_UP_DOWN; } =20 @@ -126,7 +126,7 @@ static irqreturn_t hi6421v600_irq_handler(int irq, void= *__priv) continue; =20 for_each_set_bit(offset, &pending, BITS_PER_BYTE) { - generic_handle_irq(priv->irqs[offset + i * BITS_PER_BYTE]); + generic_handle_irq_safe(priv->irqs[offset + i * BITS_PER_BYTE]); } } =20 --=20 2.34.1