From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B4BA17A597 for ; Mon, 23 Dec 2024 16:22:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734970973; cv=none; b=HVms41b/aRKYaUR2Rq62Ddtc9BjRLnbZd3kuyu+OKwf3xJ8/DewdYB9YjgBobFwJFo5uJB5hDi6qrIb7a7dpoCY5H/dX789q8B3ROmLnFMDYA1ZwHY8+DdTACWl2DXHMvX307/CEAL7yZKdewLaihVAHMdqONVwzpTCvKfWHrwk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734970973; c=relaxed/simple; bh=r9g+jVNIJXxRfMfgPMSdSwe3K7NKYnCuRhvhIZjXQ2Q=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Y6KOJT3hkezXNxHnKZ7olHTQvSkSjzik3HVrbSj5xVpAbrBCF+zrCQzVitP0DafWey3KBiI9DudEotlVGkM0pEmCVwzdnaOzTtsI3qmGxmCuYXBZr9CjanDFSdc5ghHzXtXPYGt6t6dC+OEI9tZygx9XY7Fh+/XJ3XvqXhQwors= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4YH39l6JzWz6K9VV; Tue, 24 Dec 2024 00:18:51 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id 58D2C140B3C; Tue, 24 Dec 2024 00:22:42 +0800 (CST) Received: from localhost (10.47.75.118) by frapeml500008.china.huawei.com (7.182.85.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 23 Dec 2024 17:22:41 +0100 Date: Mon, 23 Dec 2024 16:22:39 +0000 From: Jonathan Cameron To: Yicong Yang CC: , , , , , , Subject: Re: [PATCH] drivers/perf: hisi: Set correct IRQ affinity for PMUs with no association Message-ID: <20241223162239.00005774@huawei.com> In-Reply-To: <20241223125134.57885-1-yangyicong@huawei.com> References: <20241223125134.57885-1-yangyicong@huawei.com> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml100002.china.huawei.com (7.191.160.241) To frapeml500008.china.huawei.com (7.182.85.71) On Mon, 23 Dec 2024 20:51:34 +0800 Yicong Yang wrote: > From: Yicong Yang > > For PMUs with no association, the hisi_pmu->on_cpu is initialized > according to the NUMA locality but use a wrong CPU for the interrupt > affinity. The CPU selected from cpumask_local_spread() can be different > from the CPU by the cpuhp callback. Fix this by setting the IRQ affinity > to hisi_pmu->on_cpu. > > Fixes: 6cd137088fdf ("drivers/perf: hisi: Refactor the detection of associated CPUs") > Signed-off-by: Yicong Yang Acked-by: Jonathan Cameron > --- > drivers/perf/hisilicon/hisi_uncore_pmu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/perf/hisilicon/hisi_uncore_pmu.c b/drivers/perf/hisilicon/hisi_uncore_pmu.c > index 83bdc9c31367..ef058b1dd509 100644 > --- a/drivers/perf/hisilicon/hisi_uncore_pmu.c > +++ b/drivers/perf/hisilicon/hisi_uncore_pmu.c > @@ -510,7 +510,7 @@ int hisi_uncore_pmu_online_cpu(unsigned int cpu, struct hlist_node *node) > return 0; > > hisi_pmu->on_cpu = cpumask_local_spread(0, dev_to_node(hisi_pmu->dev)); > - WARN_ON(irq_set_affinity(hisi_pmu->irq, cpumask_of(cpu))); > + WARN_ON(irq_set_affinity(hisi_pmu->irq, cpumask_of(hisi_pmu->on_cpu))); > return 0; > } >