Received: by 2002:a9a:4c47:0:b029:116:c383:538 with SMTP id u7csp978888lko; Tue, 13 Jul 2021 14:20:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfG/e3QYaaoAyhBHhDIQ03zDhXqS4Znu9dWOAPHxjvcT0OTMuX2Ye1ttcoKcMXJ9tRs0G/ X-Received: by 2002:aa7:ca44:: with SMTP id j4mr8194820edt.203.1626211223399; Tue, 13 Jul 2021 14:20:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626211223; cv=none; d=google.com; s=arc-20160816; b=AF0SEwaugGGEkLO5IAKiDJO+RYE/L9VqM5AbdPZskZry4ZNVefD//2ZnQA1AoyCUwT F8nHQgC5SjLlPKZVUafCY77lX9vIYLNfuYvq8PP3/8OL2LUnagFSetTb00xj698L4xgD n0asFxfXoQj/2ZMMtqt27s/PCGsWoEOBLRCgY3l7tETCysprnJtyo6xtrip3iBNFZpPZ zuAi3tyRJeTifwssCnDtvMDeh6WBSRF/sK9foiMxCl+/3nhnP6soZGs9fl5mqUPI9mWX bjAKKVnpkmKwLpMURYHyAE8wJee6LCZBEt98rwCC4tvOpowFSvymnIqLmipzk0a1orz0 7VZg== 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=W/rDQZ2/uOaD8chQ0Gxqn1bMYciZ7aw4+OVOjh/aEBjTcgtkxF6nMX+jtkw42ZSh1I DiZKFfXKGM/kJ4jQEWWodSAFPkPW6gxJHXjHtnXXisHAdjwEVHRJoIhgU9FvItNNhV/U bioWXNgWPlyvx1vVMFrvn75daVh8mMy7cNKg2y5xKyGEpUdp2Tr/jLrGNNNgixWhFz+3 0PZI5SdoZIYI1ljGOlRqRZlvufLUbTTWNosHd5Xl12pjKMnJjhrkaogIDWvPWq392SR2 cG/mnxmsOzUpGtTgRFKLBnEDrDL/K8UNmD6vLBuVChmiHli4L9Gh3I/i/QkaUqg7/wY/ CHng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="bnLssb/Y"; 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 b23si9206182edy.354.2021.07.13.14.19.59; Tue, 13 Jul 2021 14:20:23 -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="bnLssb/Y"; 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 S236763AbhGMVT6 (ORCPT + 99 others); Tue, 13 Jul 2021 17:19:58 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:37786 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236258AbhGMVT4 (ORCPT ); Tue, 13 Jul 2021 17:19:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626211025; 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=bnLssb/YcS/Cpxhs8SUTzCuKqI4c8kGwheg2GyV3oNpySBCXFU0VwiotDGCrnlzT7IwnGx 7wPvqrdKbgNRy6fTMvBCi7MEsvTyx+gEVtbN9JcSLW4ZgHe9ZD8uh5vJVDUm279EDSuYts cavFIP5yY3seiF3lCFKCF5AYBb97yok= 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-543-h_mrSUyTN6aSFN7_ZHylgg-1; Tue, 13 Jul 2021 17:17:03 -0400 X-MC-Unique: h_mrSUyTN6aSFN7_ZHylgg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 40378100B3B7; Tue, 13 Jul 2021 21:16:58 +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 F2BF25D9DD; Tue, 13 Jul 2021 21:16:44 +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 Subject: [PATCH v3 12/14] hinic: Use irq_set_affinity_and_hint Date: Tue, 13 Jul 2021 17:15:00 -0400 Message-Id: <20210713211502.464259-13-nitesh@redhat.com> In-Reply-To: <20210713211502.464259-1-nitesh@redhat.com> References: <20210713211502.464259-1-nitesh@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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