Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp297024pxb; Thu, 27 Jan 2022 22:24:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJwIix1RwfsQRidjdbJAm5/ZgAH0feaSKb2AEs5QY/k8vYsvzwMAjD8yMLDHnT08rnzhjjpC X-Received: by 2002:a50:9555:: with SMTP id v21mr6815592eda.214.1643351059925; Thu, 27 Jan 2022 22:24:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643351059; cv=none; d=google.com; s=arc-20160816; b=lVBztjuvqTGFpQyMUgHp2NBZlmFLjW666GnxLRmBFffrTEodJyEAmVyxxcEOfWjX37 mZDebTI7MXjCoxYse0eW79AVIK8XycvnAhIxmA+tkF/40BKS6cz6DH6Up+8jLIeYbNms 42sMiJVVHLn6Jh0WQaZ9TrKNa4x9CKVFMXtE3TrY30nIloykh7+DQMT4Qc8vdX9AlBks MIJfK/dqDHcVcfyncJdNyfnlPvW/zn73pLUwrrLBNuJ37GzlSRi9/tpUjachybaAIWZ3 emG1XgeemsQmd+M9BbsKKgZIavJS5pMbl+tMkjzAvOSqQ1LGgSpX5H7hFk8XLHdiQ4mP 7GnQ== 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:from :dkim-signature; bh=xRfG6qv9eNrmVk+OrljXkrc5mg43YFh2rdY8MzYAUgM=; b=kcz2NaxtN6JD0wxhNRqnYj1h7laj71PJafgwCIadF72ggoNwYr0Yltil8WYwOZHo4n cq4sWp5IUWPIC4gNQpIx+lMFPJ4BA3QTfxM9gYFBZEg0PERB4295fQghnA/C7bg959JE YdMpam7I7LbqJNFD0m1YCB2tVQVdEak4jSkPnLWg5qQZW7/22D+t8kKzuibn2oGDhjuU ey0PS7U18KO92ZwCr6VXkr8iX5kQULa+pav6HuiTp80wbtjtAEZB+Nxnh71Itz0tqWr1 3Hnmtk7qdqZvhoQPXaxWqKGvZSFOX9YcbDCo5Xd5oMnNfyg9hgTyC4uAAdvKPFz7dOa3 Mllg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@natalenko.name header.s=dkim-20170712 header.b=XIOCTcxR; 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=REJECT sp=REJECT dis=NONE) header.from=natalenko.name Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gs13si2753299ejc.532.2022.01.27.22.23.55; Thu, 27 Jan 2022 22:24:19 -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=@natalenko.name header.s=dkim-20170712 header.b=XIOCTcxR; 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=REJECT sp=REJECT dis=NONE) header.from=natalenko.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242535AbiA0Ola (ORCPT + 99 others); Thu, 27 Jan 2022 09:41:30 -0500 Received: from vulcan.natalenko.name ([104.207.131.136]:36796 "EHLO vulcan.natalenko.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231443AbiA0Ol3 (ORCPT ); Thu, 27 Jan 2022 09:41:29 -0500 Received: from spock.localnet (unknown [83.148.33.151]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by vulcan.natalenko.name (Postfix) with ESMTPSA id 38C73D8B248; Thu, 27 Jan 2022 15:41:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=natalenko.name; s=dkim-20170712; t=1643294486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xRfG6qv9eNrmVk+OrljXkrc5mg43YFh2rdY8MzYAUgM=; b=XIOCTcxRxoBYbF1ZVSNa4whYzYj/UVLtiCZawfTGuczIfGj78m+V4SJ5+IBZ+Z8Phvp9A8 QQ05YD6gW3L+FqdvakRaKsGakD8q5PwvErpFM6qO7KrgkNw237gy9Qx8SUTiS7E9ZN0BAw rRcK6E3kv+X1jImpCrFsDULfv+iRfng= From: Oleksandr Natalenko 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, Sebastian Andrzej Siewior 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 , Michael Below , Salvatore Bonaccorso Subject: Re: [PATCH 2/7] i2c: core: Use generic_handle_irq_safe() in i2c_handle_smbus_host_notify(). Date: Thu, 27 Jan 2022 15:41:24 +0100 Message-ID: <4929165.31r3eYUQgx@natalenko.name> In-Reply-To: <20220127113303.3012207-3-bigeasy@linutronix.de> References: <20220127113303.3012207-1-bigeasy@linutronix.de> <20220127113303.3012207-3-bigeasy@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello. On =C4=8Dtvrtek 27. ledna 2022 12:32:58 CET Sebastian Andrzej Siewior wrote: > The i2c-i801 driver invokes i2c_handle_smbus_host_notify() from his > interrupt service routine. On PREEMPT_RT i2c-i801's handler is forced > threaded with enabled interrupts which leads to a warning by > handle_irq_event_percpu() assuming that irq_default_primary_handler() > enabled interrupts. >=20 > i2c-i801's interrupt handler can't be made non-threaded because the > interrupt line is shared with other devices. >=20 > Use generic_handle_irq_safe() which can invoked with disabled and enabled > interrupts. >=20 > Reported-by: Michael Below > Link: https://bugs.debian.org/1002537 > Cc: Salvatore Bonaccorso > Signed-off-by: Sebastian Andrzej Siewior > --- > drivers/i2c/i2c-core-base.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c > index 2c59dd748a49f..3f9e5303b6163 100644 > --- a/drivers/i2c/i2c-core-base.c > +++ b/drivers/i2c/i2c-core-base.c > @@ -1424,7 +1424,7 @@ int i2c_handle_smbus_host_notify(struct i2c_adapter= *adap, unsigned short addr) > if (irq <=3D 0) > return -ENXIO; > =20 > - generic_handle_irq(irq); > + generic_handle_irq_safe(irq); > =20 > return 0; > } >=20 Reviewed-by: Oleksandr Natalenko Worth linking [1] [2] and [3] as well maybe? [1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1873673 [2] https://bugzilla.kernel.org/show_bug.cgi?id=3D202453 [3] https://lore.kernel.org/lkml/20201204201930.vtvitsq6xcftjj3o@spock.loca= ldomain/ =2D-=20 Oleksandr Natalenko (post-factum)