Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp6358404pxb; Thu, 27 Jan 2022 12:03:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJzlEsERiN42INyZhadJO8Y+0wI8TwMLGvH2oTw0CaavCveR+aGDnans6lmMtoao9OEO2fir X-Received: by 2002:a17:90b:3511:: with SMTP id ls17mr13936421pjb.241.1643313795206; Thu, 27 Jan 2022 12:03:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643313795; cv=none; d=google.com; s=arc-20160816; b=VsklvxiFu0mByeONpl1Iq0Wu9K9hsWsvPCRCCZCubOaszx5O/RhQCB+RrurMMqt5QT 7v4WFexx+6DhVyu28aWa4+rUg/z/Q0lHohJRCQgRon/gnznGAty90meE/kML4mBZOQR4 LNBg2XLiGYj9/5jvp4+k9BCO5YR4ny4PYh3VAetFTvXLt/8c7cdnwbLhxWW2XIUeTWcA Y7QK5W7kT3b0hD9kAWvInPmaYhgd/vNY2vkY2A/fn9ZNw1rv6isjWhlTqavRFj1JU5Jz qhIcBxkpk09h/h50ddjCZfirPlPHOzuFQW9nlscS+ZCQUjOje4zaKM4GEBXvohk1Q/MW JpUw== 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=wTKjbYOxuRFcL31Sy6LSHpAHIAEA5Do9fBb8rIU2B/A=; b=rZyxCPsKzifhAb6sMM2v1gtCbAsqfzGXkn/dYFdfJqMHpOEH9G/Vp5q1pxZUEBJi3f tvnoUReBARsGaz+N5gvXpGb1FPvvxilYEP5kYC18Ot60ZGo2fY4R4juUjdj5iUXii++z I3cwa0xrTjss4GcBvvnrXDewojraAkQq412ckwkeWWI1uWxVK1uLYc/ukjg5OMZeM6zw 8fSjkd1ER+Lm/Vl4GJEg/bMSzrFmPrSYI7zIJLGlCVvYWpPf4uxMuuIDlyPEK2zruSRS GNPKCR/zlPn9RQ3YQM/nnoLjcBmvmqbV4ttMSOsywiUfIC+3lYW8LbvNL/d4R4exhd5R oQaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=JKVRy6jN; 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 l10si3445687pgp.92.2022.01.27.12.03.02; Thu, 27 Jan 2022 12:03:15 -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=JKVRy6jN; 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 S240540AbiA0LdW (ORCPT + 99 others); Thu, 27 Jan 2022 06:33:22 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:35678 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240452AbiA0LdR (ORCPT ); Thu, 27 Jan 2022 06:33:17 -0500 From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1643283195; 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=wTKjbYOxuRFcL31Sy6LSHpAHIAEA5Do9fBb8rIU2B/A=; b=JKVRy6jNueSrYIN6Xe3JiWap0sunJm+2QdxKeILRU59BwtyBatJK0iWtQj5t285PKHOt3B LZSJvksiOCnCmb1pWYwjpZ3dS05Jo9hnhL0mD/hbbXU9b6PU9/6DScg3Zo5PM6d1rQNiJu FZ1npFIuC9ZY0NjZPIk1w82UUoVxX+NHar9HUAqz1J5b5QPCof71pawdcrrGcz9DsoU1W7 +ZQi4p7ESLBqUHelgD7ClXhI45Rycs+0aSgLSysa5IvNkvyuj2ZPs7Gbbw7gfabX6tBEUE jeogssDZhf4C2eP0LgUBx8YMwwXRrY7Eqz6tQ99PfaJ4JyFfTWgFF/yeGh1kVw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1643283195; 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=wTKjbYOxuRFcL31Sy6LSHpAHIAEA5Do9fBb8rIU2B/A=; b=VgquP+WkCVhYqSRx0+UG+vW3EM3AWP3WCFrN8rLQ5teC06FJyBDBteYWgyOe75HAEiL3oq GxNJ2dKiRYy6CIAg== 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 , Michael Below , Salvatore Bonaccorso Subject: [PATCH 2/7] i2c: core: Use generic_handle_irq_safe() in i2c_handle_smbus_host_notify(). Date: Thu, 27 Jan 2022 12:32:58 +0100 Message-Id: <20220127113303.3012207-3-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 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. i2c-i801's interrupt handler can't be made non-threaded because the interrupt line is shared with other devices. Use generic_handle_irq_safe() which can invoked with disabled and enabled interrupts. 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(-) 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 2.34.1