Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp6536756pxu; Thu, 24 Dec 2020 05:13:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJwhoWopvqkXsNCgikxNQ8MtN6fWCiULy7rAR7ZC/2MndtBD/pKiSU7sZWB3qyrioNcO5Xn9 X-Received: by 2002:a05:6402:2074:: with SMTP id bd20mr28143890edb.326.1608815586254; Thu, 24 Dec 2020 05:13:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608815586; cv=none; d=google.com; s=arc-20160816; b=WwekE446PyJKlSBPLf8vV0ryM/m4+mHWiltayHmYZfE4Xhi80L6Be1O1Qxsu7LuWlZ +X6Qq2WoIiGP/a68QkHQnV1dYaNrookn0WTL0pJUBumarNKI2OTGxZbEDf8+EeJbb3V8 3CqqmowlVM1E3kpz0wfUiesnAvo9BIuDHTWQyhbRZSWRD24YxC903phhWLf5+kFuhKfR PZFnc0KC/7BC2Ghep4ZADAm1Mau06HqjUwLjrNwu38CxeP18YlVUlPqcpPQUnwZ/uTKo XkUI+vMTQROSJjJgqeLjo23jJhbQ1ixgdbMZzTMJQ6WRHdRq2t6NVu+uBdHsZbzNCFjD u4kg== 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 :message-id:date:subject:cc:to:dkim-signature:dkim-signature:from; bh=TvNobAOXgUaUxeUOktLm8nVfhFlqbD/7mmuwOekg2Ck=; b=SmMRRD5ETF6+EGMvR/U0r52OzUptXYEu3X5BaW/L1CXzUaPyVL/wTNZX/IzMIcEGCl LmAxJC/qfzfTzfTYNp8pazbk8GnNLSi0VPaZwTfat2XUOaQkt4Ku6OCqKjCqVhf4Pf3p xoAEnJ6/JCh8DY4BJT/Ef7/PGwfzFOF1s7EPIxEkKyApxoL86ptc2h3z5V2i8It1JOuv YyVSCg+BwFa1emlmuCoGqT+oB6B6yGqcIDcBZmSnG5wcZUDrTWC2PBsLNz4rKstJVeAu TbrnYVKd2x7U9f8o/qLXV/uhaGA7kAqrckZlL1+hNW/DrM+Qk21W15NgDnYb2Lj9hdAA meQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=V5fhsFab; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=12iMUtFH; 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 m1si13361158eje.652.2020.12.24.05.12.43; Thu, 24 Dec 2020 05:13:06 -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=V5fhsFab; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=12iMUtFH; 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 S1727039AbgLXNMe (ORCPT + 99 others); Thu, 24 Dec 2020 08:12:34 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:34942 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726544AbgLXNMd (ORCPT ); Thu, 24 Dec 2020 08:12:33 -0500 From: "Ahmed S. Darwish" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1608815511; 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; bh=TvNobAOXgUaUxeUOktLm8nVfhFlqbD/7mmuwOekg2Ck=; b=V5fhsFabHjfhFvk1l/6VpGj62n4oHO63kDs1Djnqfju5XN/4Uv8nRaR+ZDZ0mu9pv7zxdG uBMroYfUXuSAoim5SjtYoDbxvZgPYIt6LRlKFldN1kuB0HGI7M9RDgBqRAboIaT5tif7or I7piWVOyXzPL7pMfepSZjJc07vofD8VH6HjD2s+SwSaWB8fCsOtnDUEy4IKFjrZNgIVqNl B/rN8YXo5apy6895rdhqmuQqh9g1s6zJ8clI/rwzW3dpJIoIy4DG6oc4HKT9QT0l1Rl+bw hBL030dxhbmK62piBPatfVSjk59PjLCl+swGtDAHNvUR/lCxMMlfsJU50mObhw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1608815511; 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; bh=TvNobAOXgUaUxeUOktLm8nVfhFlqbD/7mmuwOekg2Ck=; b=12iMUtFHUZVpbaWtCf92xXB0pzMfftm74gs82EBUJoizkVkCfFtPnVBxW5tbM4ttYI7pkJ iFtk3r6KgrqmzeBA== To: Rahul Lakkireddy , Rohit Maheshwari , Vinay Kumar Yadav , Vishal Kulkarni , netdev@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , LKML , Thomas Gleixner , "Sebastian A. Siewior" , "Ahmed S. Darwish" Subject: [RFC PATCH 0/3] chelsio: cxgb: Use threaded irqs Date: Thu, 24 Dec 2020 14:11:45 +0100 Message-Id: <20201224131148.300691-1-a.darwish@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Folks, The t1_interrupt() irq handler calls del_timer_sync() down the chain: sge.c: t1_interrupt() -> subr.c: t1_slow_intr_handler() -> asic_slow_intr() || fpga_slow_intr() -> t1_pci_intr_handler() -> cxgb2.c: t1_fatal_err() # Cont. at [*] -> fpga_slow_intr() -> sge.c: t1_sge_intr_error_handler() -> cxgb2.c: t1_fatal_err() # Cont. at [*] [*] cxgb2.c: t1_fatal_err() -> sge.c: t1_sge_stop() -> timer.c: del_timer_sync() This is invalid: if an irq handler calls del_timer_sync() on a timer it has already interrupted, it will just loop forever. That's why del_timer_sync() also has a WARN_ON(in_irq()). Included is an RFC patch series that runs the interrupt handler slow path, t1_slow_intr_handler(), in a threaded-irq context. This also leads to nice code savings across the driver, as some workqueues and spinlocks are no longer needed. Note: Only compile-tested. I do not have the hardware in question. Thanks, 8<-------------- Ahmed S. Darwish (3): chelsio: cxgb: Remove ndo_poll_controller() chelsio: cxgb: Move slow interrupt handling to threaded irqs chelsio: cxgb: Do not schedule a workqueue for external interrupts drivers/net/ethernet/chelsio/cxgb/common.h | 2 - drivers/net/ethernet/chelsio/cxgb/cxgb2.c | 58 ++-------------------- drivers/net/ethernet/chelsio/cxgb/sge.c | 25 +++++++--- drivers/net/ethernet/chelsio/cxgb/sge.h | 3 +- drivers/net/ethernet/chelsio/cxgb/subr.c | 2 +- 5 files changed, 25 insertions(+), 65 deletions(-) base-commit: 2c85ebc57b3e1817b6ce1a6b703928e113a90442 -- 2.29.2