From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0370C433FE for ; Fri, 10 Dec 2021 19:54:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343713AbhLJT5o (ORCPT ); Fri, 10 Dec 2021 14:57:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242904AbhLJT5k (ORCPT ); Fri, 10 Dec 2021 14:57:40 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D124DC061746; Fri, 10 Dec 2021 11:54:04 -0800 (PST) Date: Fri, 10 Dec 2021 19:54:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1639166042; h=from:from:sender:sender:reply-to: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=loCC16nc6HQV+uPekAjTPQIwBYNRMXRxY1eYB+pBW9g=; b=bNKz1NNX/9fTcVijdoaGimpX5LAMhvALjW9sNT0UUKRkadeufoBwAx6D7SF/mM4EhlGW+I +IPqYirQMfF6Q22vo3vLzq1KcApanEliZVYdrxyHiqni4UG4eS1/2YJXzWwLgW+4z9rlCj 7hWlRqjUQFcTjhUmdfRCQm1LDfD7Agtv2e02mO/HMJs3gPfBDCOsSXRLRU6tOsoNYtdMMH mL6ccNDIFGoeaXXyQDNqs2dzYSeENut4ctF3+fCX8XL2ABP97pfnyhnoNHFxu2zjvZu3Gv cow6uIM28+4BjtfiD9nf5vjgdJuTLGkH5cBoGkrXjqr5EcBphWzC7Dli04AeXw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1639166042; h=from:from:sender:sender:reply-to: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=loCC16nc6HQV+uPekAjTPQIwBYNRMXRxY1eYB+pBW9g=; b=aoSJUETf2DM3xy3RMB3LlWSSKjSE8p4y0Q59oBuUtBeSgdlRn6lZW2B2oDjgWCk9/NCv38 ySvllqs3GVCr9NDA== From: "tip-bot2 for Nitesh Narayan Lal" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] net/mlx4: Use irq_update_affinity_hint() Cc: Nitesh Narayan Lal , Thomas Gleixner , Leon Romanovsky , Tariq Toukan , x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: <20210903152430.244937-15-nitesh@redhat.com> References: <20210903152430.244937-15-nitesh@redhat.com> MIME-Version: 1.0 Message-ID: <163916604134.23020.15884032977080009986.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/core branch of tip: Commit-ID: 4b3ddc6462e83452182177b48c4bc53607acd68e Gitweb: https://git.kernel.org/tip/4b3ddc6462e83452182177b48c4bc53607acd68e Author: Nitesh Narayan Lal AuthorDate: Fri, 03 Sep 2021 11:24:30 -04:00 Committer: Thomas Gleixner CommitterDate: Fri, 10 Dec 2021 20:47:40 +01:00 net/mlx4: Use irq_update_affinity_hint() The driver uses irq_set_affinity_hint() to update the affinity_hint mask that is consumed by the userspace to distribute the interrupts. However, under the hood irq_set_affinity_hint() also applies the provided cpumask (if not NULL) as the affinity for the given interrupt which is an undocumented side effect. To remove this side effect irq_set_affinity_hint() has been marked as deprecated and new interfaces have been introduced. Hence, replace the irq_set_affinity_hint() with the new interface irq_update_affinity_hint() that only updates the affinity_hint pointer. Signed-off-by: Nitesh Narayan Lal Signed-off-by: Thomas Gleixner Reviewed-by: Leon Romanovsky Reviewed-by: Tariq Toukan Link: https://lore.kernel.org/r/20210903152430.244937-15-nitesh@redhat.com --- drivers/net/ethernet/mellanox/mlx4/eq.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/eq.c b/drivers/net/ethernet/mellanox/mlx4/eq.c index 9e48509..414e390 100644 --- a/drivers/net/ethernet/mellanox/mlx4/eq.c +++ b/drivers/net/ethernet/mellanox/mlx4/eq.c @@ -244,9 +244,9 @@ static void mlx4_set_eq_affinity_hint(struct mlx4_priv *priv, int vec) cpumask_empty(eq->affinity_mask)) return; - hint_err = irq_set_affinity_hint(eq->irq, eq->affinity_mask); + hint_err = irq_update_affinity_hint(eq->irq, eq->affinity_mask); if (hint_err) - mlx4_warn(dev, "irq_set_affinity_hint failed, err %d\n", hint_err); + mlx4_warn(dev, "irq_update_affinity_hint failed, err %d\n", hint_err); } #endif @@ -1123,9 +1123,7 @@ static void mlx4_free_irqs(struct mlx4_dev *dev) for (i = 0; i < dev->caps.num_comp_vectors + 1; ++i) if (eq_table->eq[i].have_irq) { free_cpumask_var(eq_table->eq[i].affinity_mask); -#if defined(CONFIG_SMP) - irq_set_affinity_hint(eq_table->eq[i].irq, NULL); -#endif + irq_update_affinity_hint(eq_table->eq[i].irq, NULL); free_irq(eq_table->eq[i].irq, eq_table->eq + i); eq_table->eq[i].have_irq = 0; }