From nobody Sun Feb 8 15:18:43 2026 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) (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 AB6E91917D8 for ; Mon, 23 Dec 2024 12:51:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.255 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734958297; cv=none; b=iJdezHbeb+OWD647CEJRfZgyO2vgFRRczTadocrJQ774PQ459H4xMeey2LjFBO5rtYGKUHee3XnpEcdgdBnidFq+9fwVUaDMcckcEdz9MPUrmxtNK07SB66QLJTMmW2YBU4DV6OgGTDyRbCqYMEvZWADFzxTJS0WRTZ94zKp1Ls= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734958297; c=relaxed/simple; bh=YRe7xBi4i7TKkhg1bPU5zVjVZ4/TxtPHozX3Ezsn450=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=WS9eFTHcu/hUcqFLH3tl4kunheO+e5BOaY/khasOmGNh8f4lZWpb/S+poFyEleOow1L6Kh6s18BCWC9fQP+pecbnJmSrlrSTuFn5d1+xSziY6c+tTB3BftqBR9hCrWw9qjhiKiaqLPVV/uzNFHJn82T2afmhopOtkiZTlIpuK3Y= 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=45.249.212.255 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.19.163.48]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4YGyVg0293z1V708; Mon, 23 Dec 2024 20:48:11 +0800 (CST) Received: from kwepemd200014.china.huawei.com (unknown [7.221.188.8]) by mail.maildlp.com (Postfix) with ESMTPS id 3E65818007C; Mon, 23 Dec 2024 20:51:32 +0800 (CST) Received: from localhost.localdomain (10.50.165.33) by kwepemd200014.china.huawei.com (7.221.188.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Mon, 23 Dec 2024 20:51:31 +0800 From: Yicong Yang To: , , , CC: , , , Subject: [PATCH] drivers/perf: hisi: Set correct IRQ affinity for PMUs with no association Date: Mon, 23 Dec 2024 20:51:34 +0800 Message-ID: <20241223125134.57885-1-yangyicong@huawei.com> X-Mailer: git-send-email 2.31.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemd200014.china.huawei.com (7.221.188.8) Content-Type: text/plain; charset="utf-8" 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 associa= ted 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/hisili= con/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; =20 hisi_pmu->on_cpu =3D 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; } =20 --=20 2.24.0