Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4992726pxv; Tue, 20 Jul 2021 16:32:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRD3WBu4lFVRe9lhpa/rbbPnvnAkK1GUO7ble0/3Spu9jzH2Ood7fgKYRUBkt79sCGQFHq X-Received: by 2002:aa7:d5c8:: with SMTP id d8mr44023659eds.165.1626823968107; Tue, 20 Jul 2021 16:32:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626823968; cv=none; d=google.com; s=arc-20160816; b=VcfM6S2j7YCrngCoZyTrNGbPc/Ao7U5gdRb+Y84dv+9+Mxe0ZYB14gqIhXobhTmMJ3 JxYq+OetdLBNwJORZasOp/insUmdIWnOjIZxBApogmDxaPFwonKEHiRyO7Q2n2GOMvcQ KEZrJQmai9D1KQ1o6OttMrsz+UKXL+L57tYiEwMK3YfJM+1Rsr6L3rSrR8CewIhhxdHF urP/gwT4MTi3R8ZjnLvSWXl4gMzFPNwVLnaD/k6BbRghJg80YgxpqJvph+gMKJlE0xw+ /rFknlXR82uuhAElgk8nXS1xqDqoZ3WmAv9b69lYOssvgA9gyKTvlQpfHF/cT0vJksln TtVQ== 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=zD/AaGcE7EIGISn2zwz3u10joSTkCMi6Zhxs5OikZmo=; b=BrCJNPOLStYUcwq9D8gaMlG8wBxwgwotbmcac9cXBi9qEV0qEF+7TO1i8Z+WM1ZOQA QTyEsxMfH5XEPuA+9K1K16fxaWlILY0aAkDeX9F6eCKzkK0ipzSP1EjumFId0XBe4G86 54fpCpjdC4DhltGPgLvRmereJuz5gqx6ARreiNvGfBnTSO2g+mW3At8NzG0Qx/RdEi0I brIfNyO7FCF4IR9MMMyeB8hnofyQa1M7WaqBGLzvP42R+5OPxFEW9Qa9Rq3r4nM1ghaa Fh5LQGt7fQpb+apkQKT77rOao7qZ/j8QnJRLIec2nLgkF4/nKsUPw0MV9CEJsN325DeJ UWIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BF4CeAmx; 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 cq5si26442928edb.416.2021.07.20.16.32.24; Tue, 20 Jul 2021 16:32:48 -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=BF4CeAmx; 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 S232263AbhGTWuQ (ORCPT + 99 others); Tue, 20 Jul 2021 18:50:16 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:30897 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236023AbhGTWrL (ORCPT ); Tue, 20 Jul 2021 18:47:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626823668; 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=zD/AaGcE7EIGISn2zwz3u10joSTkCMi6Zhxs5OikZmo=; b=BF4CeAmx2vE3lv5hgt24XDR8/KFcMrZX1gcVBX+ziknFh79o4Bg7ISHwtna5M1CleQhNwx RveEzYUHTiH9vs+WSVPYbAdcVE/Tj7iBrJ99VE2x/92iaAPTmWBHvKJlOb8/PafAnTbJiY Sg0t3CvchwS6bBE1zWaqBcTKMBgZJmc= 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-289-YG2NnwFxN-SR8Qh3KuZGvQ-1; Tue, 20 Jul 2021 19:27:47 -0400 X-MC-Unique: YG2NnwFxN-SR8Qh3KuZGvQ-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 89BF51084F40; Tue, 20 Jul 2021 23:27:45 +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 8D27669CB4; Tue, 20 Jul 2021 23:27:37 +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, chandrakanth.patil@broadcom.com, bjorn.andersson@linaro.org, chunkuang.hu@kernel.org, yongqiang.niu@mediatek.com, baolin.wang7@gmail.com, poros@redhat.com, minlei@redhat.com, emilne@redhat.com, jejb@linux.ibm.com, martin.petersen@oracle.com, _govind@gmx.com, kabel@kernel.org, viresh.kumar@linaro.org, Tushar.Khandelwal@arm.com, kuba@kernel.org Subject: [PATCH v5 12/14] hinic: Use irq_set_affinity_and_hint Date: Tue, 20 Jul 2021 19:26:22 -0400 Message-Id: <20210720232624.1493424-13-nitesh@redhat.com> In-Reply-To: <20210720232624.1493424-1-nitesh@redhat.com> References: <20210720232624.1493424-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() where the provided mask needs to be applied as the affinity and affinity_hint pointer needs to be set and replace with irq_update_affinity_hint() where 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 fed3b6bc0d76..b33ed4d92b71 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_rx.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_rx.c @@ -548,7 +548,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; @@ -565,7 +565,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