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 F3E3EC433EF for ; Fri, 10 Dec 2021 19:54:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343883AbhLJT6G (ORCPT ); Fri, 10 Dec 2021 14:58:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343784AbhLJT5t (ORCPT ); Fri, 10 Dec 2021 14:57:49 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF8CFC061B38; Fri, 10 Dec 2021 11:54:12 -0800 (PST) Date: Fri, 10 Dec 2021 19:54:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1639166051; 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=XAHBROioruV4HC6G6SEoPoUd5rPvgxD2riQjqzc+S2U=; b=iokqu01jhA7kPidoNVf4F0S21YkcmUZkt6ld7tKmDFWSailjZvtzMfXbmi75a2u7J9MIfI hULznSNKjyVaX/RzGAHPb4gdG0LxDyrEooO9xjJbGy6Qv0h5Mab5SYI+CpiUNBPEoyxRu+ 4CVcMW/nDnG4aLZcHPfbYs32zGHCeZDKyolHSmJiziMZngCicqC/kpSNXL1gsjAtb+cVx8 vnUrUJF1fhwKGQvQnOcNHCNO7fj13KiBE/pEoA2BVRamNbNzEhYGdNHipYYAnHQ3j8FMS3 ajStsChF3gcIPaXImHcuhMvjcCnQHBcMr4uTjZxLsYuo7bFaSPHrqAYDoJPZ9w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1639166051; 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=XAHBROioruV4HC6G6SEoPoUd5rPvgxD2riQjqzc+S2U=; b=7ZmXO+z2g0SMXhyoc9a3z/7CzkhpopX06kVnOIQq0Srs0uCq98JNe+H3Ht/buzlTWC+QaT Rzb4qlePee4GkZAg== 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] i40e: Use irq_update_affinity_hint() Cc: Nitesh Narayan Lal , Thomas Gleixner , Jesse Brandeburg , x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: <20210903152430.244937-4-nitesh@redhat.com> References: <20210903152430.244937-4-nitesh@redhat.com> MIME-Version: 1.0 Message-ID: <163916605022.23020.16236144687366973040.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: d34c54d1739c2cdf2e4437b74e6da269147f4987 Gitweb: https://git.kernel.org/tip/d34c54d1739c2cdf2e4437b74e6da269147f4987 Author: Nitesh Narayan Lal AuthorDate: Fri, 03 Sep 2021 11:24:19 -04:00 Committer: Thomas Gleixner CommitterDate: Fri, 10 Dec 2021 20:47:38 +01:00 i40e: Use irq_update_affinity_hint() The driver uses irq_set_affinity_hint() for two purposes: - To set the affinity_hint which is consumed by the userspace for distributing the interrupts - To apply an affinity that it provides for the i40e interrupts The latter is done to ensure that all the interrupts are evenly spread across all available CPUs. However, since commit a0c9259dc4e1 ("irq/matrix: Spread interrupts on allocation") the spreading of interrupts is dynamically performed at the time of allocation. Hence, there is no need for the drivers to enforce their own affinity for the spreading of interrupts. Also, irq_set_affinity_hint() applying the provided cpumask as an affinity for the interrupt 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 sets the pointer for the affinity_hint. Signed-off-by: Nitesh Narayan Lal Signed-off-by: Thomas Gleixner Acked-by: Jesse Brandeburg Link: https://lore.kernel.org/r/20210903152430.244937-4-nitesh@redhat.com --- drivers/net/ethernet/intel/i40e/i40e_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index e118cf9..ef3375e 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -3891,10 +3891,10 @@ static int i40e_vsi_request_irq_msix(struct i40e_vsi *vsi, char *basename) * * get_cpu_mask returns a static constant mask with * a permanent lifetime so it's ok to pass to - * irq_set_affinity_hint without making a copy. + * irq_update_affinity_hint without making a copy. */ cpu = cpumask_local_spread(q_vector->v_idx, -1); - irq_set_affinity_hint(irq_num, get_cpu_mask(cpu)); + irq_update_affinity_hint(irq_num, get_cpu_mask(cpu)); } vsi->irqs_ready = true; @@ -3905,7 +3905,7 @@ free_queue_irqs: vector--; irq_num = pf->msix_entries[base + vector].vector; irq_set_affinity_notifier(irq_num, NULL); - irq_set_affinity_hint(irq_num, NULL); + irq_update_affinity_hint(irq_num, NULL); free_irq(irq_num, &vsi->q_vectors[vector]); } return err; @@ -4726,7 +4726,7 @@ static void i40e_vsi_free_irq(struct i40e_vsi *vsi) /* clear the affinity notifier in the IRQ descriptor */ irq_set_affinity_notifier(irq_num, NULL); /* remove our suggested affinity mask for this IRQ */ - irq_set_affinity_hint(irq_num, NULL); + irq_update_affinity_hint(irq_num, NULL); synchronize_irq(irq_num); free_irq(irq_num, vsi->q_vectors[i]);