Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4505580pxv; Tue, 29 Jun 2021 08:32:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwc91rYZvD+TNxMRAacczIcqOMSZzyLLpJTznNRQlDKv1VRnnzAd8SBxf6+GhHhXK29TRiA X-Received: by 2002:a05:6e02:1a66:: with SMTP id w6mr14315426ilv.82.1624980752622; Tue, 29 Jun 2021 08:32:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624980752; cv=none; d=google.com; s=arc-20160816; b=uOVbHX4ei1GwUqypo1Mp0GN7PDMT6tUkZkNrt+pn8IK1uI1k04bS2Er8Iyv7iJE30i 3tevzXV/UKkGEx61Ho20cmtGjJJ0/pjKbH4F1thRwO35ST/MBI2NO/rDYD3TC2BAfgo4 PwUhS22/Qx42JgGwQdQG2zp39VVkIC1u3evVwdY9hK2mSA1VZyHgmlkLuAA43P7ddyVP QGUWlpHb4IhlrNzIxsqQyzjXryAvYVrYgp1ZI3QJ5kNNbcT9NPxmbPJw+vxvqAkyBLRT ALdTm1v0fAn/nNz7SviT4aFmGCUWwLF1uk2s2ZoyuWlYh+WtqN0/nJ0bNV90KW8HFWZt joDw== 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:to:from :dkim-signature; bh=Q9/J94iiTV9NCKHY6OY11mBTH01W1s+CKGEQ51TJjE8=; b=qTInGgJ2HZWi9NJY5m2df2FG57ljkveLTKHXgy1GE6lop6Ry/0ksnZiiOVwWoru1WP 9hIs9RIyP9Z4CuPUNqXipNyv/GpZpC9dyNQfalqCrtGgPJ8rifqLZGseurd8UpMPhH3K ksZbXAXM7VJDhL4bFRVdtqAyzX9DPYsslBSrnI/oqTDesBgdVfMHnsBXlVQMUS4eSdvN blIfUCHl3dr7XDzAPg6LOCOQbHzhq1zF1XzLnuF7uTM5m15OlK6ikpEOBem/woI5/ZnC NcefO1n9xWijpqw19G+eAOT+eIPVwpHf2mQ0JhQVXrL8Ea7BEBTjntnX2D7SEqBoWgWU CRdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FnqErc3x; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u8si14031839ill.90.2021.06.29.08.32.14; Tue, 29 Jun 2021 08:32:32 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b=FnqErc3x; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235151AbhF2PdW (ORCPT + 99 others); Tue, 29 Jun 2021 11:33:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:50954 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235100AbhF2PdG (ORCPT ); Tue, 29 Jun 2021 11:33:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624980639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Q9/J94iiTV9NCKHY6OY11mBTH01W1s+CKGEQ51TJjE8=; b=FnqErc3xCe4mVpHuO2fWs7rq6o770GWnbm+5R+RXYWXK227B5Uq6GIA8H+NGIhrd6Nbm4a 7+PhLDSaVvDRmGejhqhYhb9tkM0A2TdAzDoW8st+4PGAIGY+gJfrkoiuKFO9KnFdk7KNm6 zGbTjrvaCX7V0NW0/JgfF+pgu4bj4GM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-12-buLnwqYCNFiJ-UpkcugP3g-1; Tue, 29 Jun 2021 11:30:36 -0400 X-MC-Unique: buLnwqYCNFiJ-UpkcugP3g-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 873B9100C61B; Tue, 29 Jun 2021 15:30:31 +0000 (UTC) Received: from virtlab719.virt.lab.eng.bos.redhat.com (virtlab719.virt.lab.eng.bos.redhat.com [10.19.153.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8B00C69CB6; Tue, 29 Jun 2021 15:30:24 +0000 (UTC) From: Nitesh Narayan Lal To: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-api@vger.kernel.org, linux-pci@vger.kernel.org, tglx@linutronix.de, jesse.brandeburg@intel.com, robin.murphy@arm.com, mtosatti@redhat.com, mingo@kernel.org, jbrandeb@kernel.org, frederic@kernel.org, juri.lelli@redhat.com, abelits@marvell.com, bhelgaas@google.com, rostedt@goodmis.org, peterz@infradead.org, davem@davemloft.net, akpm@linux-foundation.org, sfr@canb.auug.org.au, stephen@networkplumber.org, rppt@linux.vnet.ibm.com, chris.friesen@windriver.com, maz@kernel.org, nhorman@tuxdriver.com, pjwaskiewicz@gmail.com, sassmann@redhat.com, thenzl@redhat.com, kashyap.desai@broadcom.com, sumit.saxena@broadcom.com, shivasharan.srikanteshwara@broadcom.com, sathya.prakash@broadcom.com, sreekanth.reddy@broadcom.com, suganath-prabu.subramani@broadcom.com, james.smart@broadcom.com, dick.kennedy@broadcom.com, jkc@redhat.com, faisal.latif@intel.com, shiraz.saleem@intel.com, tariqt@nvidia.com, ahleihel@redhat.com, kheib@redhat.com, borisp@nvidia.com, saeedm@nvidia.com, benve@cisco.com, govind@gmx.com, jassisinghbrar@gmail.com, ajit.khaparde@broadcom.com, sriharsha.basavapatna@broadcom.com, somnath.kotur@broadcom.com, nilal@redhat.com, tatyana.e.nikolova@intel.com, mustafa.ismail@intel.com, ahs3@redhat.com, leonro@nvidia.com Subject: [PATCH v2 12/14] hinic: Use irq_set_affinity_and_hint Date: Tue, 29 Jun 2021 11:27:44 -0400 Message-Id: <20210629152746.2953364-13-nitesh@redhat.com> In-Reply-To: <20210629152746.2953364-1-nitesh@redhat.com> References: <20210629152746.2953364-1-nitesh@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The driver uses irq_set_affinity_hint() to: - Set the affinity_hint which is consumed by the userspace for distributing the interrupts - Enforce affinity As per commit 352f58b0d9f2 ("net-next/hinic: Set Rxq irq to specific cpu for NUMA"), the hinic driver enforces its own affinity to bind IRQs to the local NUMA node. However, 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_set_affinity_and_hint() that applies the affinity and updates the affinity_hint pointer. Also, use irq_update_affinity() when only affinity_hint needs to be updated. Signed-off-by: Nitesh Narayan Lal --- drivers/net/ethernet/huawei/hinic/hinic_rx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/huawei/hinic/hinic_rx.c b/drivers/net/ethernet/huawei/hinic/hinic_rx.c index cce08647b9b2..c6cac4bbdb49 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_rx.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_rx.c @@ -547,7 +547,7 @@ static int rx_request_irq(struct hinic_rxq *rxq) goto err_req_irq; cpumask_set_cpu(qp->q_id % num_online_cpus(), &rq->affinity_mask); - err = irq_set_affinity_hint(rq->irq, &rq->affinity_mask); + err = irq_set_affinity_and_hint(rq->irq, &rq->affinity_mask); if (err) goto err_irq_affinity; @@ -564,7 +564,7 @@ static void rx_free_irq(struct hinic_rxq *rxq) { struct hinic_rq *rq = rxq->rq; - irq_set_affinity_hint(rq->irq, NULL); + irq_update_affinity_hint(rq->irq, NULL); free_irq(rq->irq, rxq); rx_del_napi(rxq); } -- 2.27.0