{"id":2228574,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2228574/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260427044715.559137-4-sshegde@linux.ibm.com/","project":{"id":2,"url":"http://patchwork.ozlabs.org/api/1.2/projects/2/?format=json","name":"Linux PPC development","link_name":"linuxppc-dev","list_id":"linuxppc-dev.lists.ozlabs.org","list_email":"linuxppc-dev@lists.ozlabs.org","web_url":"https://github.com/linuxppc/wiki/wiki","scm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git","webscm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/","list_archive_url":"https://lore.kernel.org/linuxppc-dev/","list_archive_url_format":"https://lore.kernel.org/linuxppc-dev/{}/","commit_url_format":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"},"msgid":"<20260427044715.559137-4-sshegde@linux.ibm.com>","list_archive_url":"https://lore.kernel.org/linuxppc-dev/20260427044715.559137-4-sshegde@linux.ibm.com/","date":"2026-04-27T04:47:14","name":"[v2,3/4] powerpc/perf: Use cpumask_intersects api for checking disable path","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"5ecfb2728daab4ad84f55270c4ade85344e772ca","submitter":{"id":87866,"url":"http://patchwork.ozlabs.org/api/1.2/people/87866/?format=json","name":"Shrikanth Hegde","email":"sshegde@linux.ibm.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260427044715.559137-4-sshegde@linux.ibm.com/mbox/","series":[{"id":501570,"url":"http://patchwork.ozlabs.org/api/1.2/series/501570/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=501570","date":"2026-04-27T04:47:11","name":"powerpc: A few misc cpumask changes","version":2,"mbox":"http://patchwork.ozlabs.org/series/501570/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2228574/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2228574/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <linuxppc-dev+bounces-20143-incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=E+uHM9ib;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=112.213.38.117; helo=lists.ozlabs.org;\n envelope-from=linuxppc-dev+bounces-20143-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)","lists.ozlabs.org;\n arc=none smtp.remote-ip=148.163.158.5","lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=linux.ibm.com","lists.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=E+uHM9ib;\n\tdkim-atps=neutral","lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com\n (client-ip=148.163.158.5; helo=mx0b-001b2d01.pphosted.com;\n envelope-from=sshegde@linux.ibm.com; receiver=lists.ozlabs.org)"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1 raw public key)\n server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g3rfZ6Bxgz1xvV\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 27 Apr 2026 14:48:06 +1000 (AEST)","from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4g3rfD3pKjz2yvF;\n\tMon, 27 Apr 2026 14:47:48 +1000 (AEST)","from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com\n [148.163.158.5])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 4g3rfC5fvMz2yvC\n\tfor <linuxppc-dev@lists.ozlabs.org>; Mon, 27 Apr 2026 14:47:47 +1000 (AEST)","from pps.filterd (m0356516.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63QAFB1h1868640;\n\tMon, 27 Apr 2026 04:47:44 GMT","from ppma11.dal12v.mail.ibm.com\n (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219])\n\tby mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4drk1je72e-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n\tMon, 27 Apr 2026 04:47:43 +0000 (GMT)","from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1])\n\tby ppma11.dal12v.mail.ibm.com (8.18.1.7/8.18.1.7) with ESMTP id\n 63R4cqqI019179;\n\tMon, 27 Apr 2026 04:47:42 GMT","from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228])\n\tby ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 4dsamy3euc-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n\tMon, 27 Apr 2026 04:47:42 +0000 (GMT)","from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com\n [10.20.54.103])\n\tby smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n 63R4lcsA15466770\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);\n\tMon, 27 Apr 2026 04:47:38 GMT","from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 896C52004B;\n\tMon, 27 Apr 2026 04:47:38 +0000 (GMT)","from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id DDB9120040;\n\tMon, 27 Apr 2026 04:47:36 +0000 (GMT)","from li-7bb28a4c-2dab-11b2-a85c-887b5c60d769.ibm.com (unknown\n [9.123.5.233])\n\tby smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTP;\n\tMon, 27 Apr 2026 04:47:36 +0000 (GMT)"],"ARC-Seal":"i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1777265268;\n\tcv=none;\n b=PjRe1z8Hfh7h5MvsONJXVFJxOjPdvN/SWeddAf7H+B8WTOS2ZhhnBdZATAtAP1PdMiULFrl+mzU0li8xltYZtP2tTcsPdyD5BXHQw1V9BjbgxQPcF747DJKLahlAReydyQgKHZ846+qxsRjtLIbUdVBR8MmB7MGx8rgEKTB6nhjCXdNHB0vTpQ3cIBpagx1FyHg4qWdjOILceI8Rn/EASTA77rbwUqNwx74sEKSAHPnyr1TYDzGmpIJSU59m2XmYEEJCbt/l3vpkZjZn9RYAltjoqracr7RVeCZc0B4qrHE+kAmgr965qLig0Hnigrriehkcyc3FqkwThJFL1UhzjQ==","ARC-Message-Signature":"i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1777265268; c=relaxed/relaxed;\n\tbh=AwrkFtRE1229PVlMmfPTQSCJ3kikN1O8+74g//G/nHk=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=Eye6Btj13Ws8ASxGKjcFSp19BdjrXQBdrIKPeiqxO5PL84ghN7+NirxSR+/3b/1r6ISHyCKpv6RgUW/uLw4B+ebZ/2U+TpYnYdsOYC3ImjQVnweEJhOdcF3we5c1KENiOy9HrFgTGKWIlJdgZ9ecg9844kklHBS17E7YAjGmaW87Bfe2AmUtHPcVNtepmIsaOSwOxcV8MJ3rKT1ExOxq6riWxmLtydq5cemUmqQnTJPe8wsCw9R9ooepGpRNzuUufU5D6oS2jqO8XPytsyjQ/lcFDCOW3y/xK+44w/Fz5iQuC6nKTMqTDWuoznxdor+hHAUXk0PnFssMMwhaTqwygQ==","ARC-Authentication-Results":"i=1; lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=linux.ibm.com;\n dkim=pass (2048-bit key;\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=E+uHM9ib; dkim-atps=neutral;\n spf=pass (client-ip=148.163.158.5; helo=mx0b-001b2d01.pphosted.com;\n envelope-from=sshegde@linux.ibm.com;\n receiver=lists.ozlabs.org) smtp.mailfrom=linux.ibm.com","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc\n\t:content-transfer-encoding:date:from:in-reply-to:message-id\n\t:mime-version:references:subject:to; s=pp1; bh=AwrkFtRE1229PVlMm\n\tfPTQSCJ3kikN1O8+74g//G/nHk=; b=E+uHM9ibWbEnZTcpkFM3fa6jxKzEnGgae\n\ttmH2hTp0MscvcgVT//+ONOtnEP1fGOGGxcIc4f+toefRzg5ntPGlIZ19l/fBdhwu\n\taa0qVeVvC3fIRLDVVIFwmaR1KHKimYA2SCvyzuI+6M3Km1EUqQgUvICvdBQS+3Eu\n\tZFCeCNv+fMl0vaa9wiNFz2SMzT5w7v7AwcKTZ5NO57qrddidLBo6tLhDzIM/VaJe\n\ttu93NkHGMg+WncEqnz+DVNzMsf+7jhg0xeDPeUjNBZbbttQNhcLb8ci5xm+SCdBx\n\tzQsAVN+Cv4iNKUBNIgMiaKxB+hZp309dHmAxSHtD/QH+qiVe0Zyjw==","From":"Shrikanth Hegde <sshegde@linux.ibm.com>","To":"maddy@linux.ibm.com, linuxppc-dev@lists.ozlabs.org, yury.norov@gmail.com,\n        linux@rasmusvillemoes.dk, linux-kernel@vger.kernel.org","Cc":"sshegde@linux.ibm.com, chleroy@kernel.org","Subject":"[PATCH v2 3/4] powerpc/perf: Use cpumask_intersects api for checking\n disable path","Date":"Mon, 27 Apr 2026 10:17:14 +0530","Message-ID":"<20260427044715.559137-4-sshegde@linux.ibm.com>","X-Mailer":"git-send-email 2.51.0","In-Reply-To":"<20260427044715.559137-1-sshegde@linux.ibm.com>","References":"<20260427044715.559137-1-sshegde@linux.ibm.com>","X-Mailing-List":"linuxppc-dev@lists.ozlabs.org","List-Id":"<linuxppc-dev.lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev+help@lists.ozlabs.org>","List-Owner":"<mailto:linuxppc-dev+owner@lists.ozlabs.org>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Archive":"<https://lore.kernel.org/linuxppc-dev/>,\n  <https://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Subscribe":"<mailto:linuxppc-dev+subscribe@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-digest@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-nomail@lists.ozlabs.org>","List-Unsubscribe":"<mailto:linuxppc-dev+unsubscribe@lists.ozlabs.org>","Precedence":"list","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-TM-AS-GCONF":"00","X-Proofpoint-Reinject":"loops=2 maxloops=12","X-Proofpoint-Spam-Details-Enc":"AW1haW4tMjYwNDI3MDA0OCBTYWx0ZWRfX8yoTcmjqXRD1\n 7oHorMT+g/pPcsRyXA0E6EWqHQf0ERzdj2wr8nOyZIiristvc5veGcwq2/2phj1RZHAIMupb3AT\n T9TuU20fCRu4ioPumdB8ZecToA2ZNl3xX6dMckInrK8iR+kztZwInspogxqB35DYCKhZxktcVkL\n Pup+cJkh/IE4ZXpVpVZVM3pzBg2mvM+PRtqJE/iB0vQh2m1iC2rFX7Qhw5Ple5Dq0cG9rHy+j5O\n NEJQoueafAqgJgKX9Y2yFNmzCGNv0JFUIRmR8OE4JEJ7HEa7LcGAOGjlpAJ74ggCtVbhF4cAvKd\n bkOtfLucj0O/9o6OwIeHnzFt/J/c2WF07wQSgUw/ZTiKrvR97nzU0+U5d/DVkM+xfqqNzDBaYsQ\n 1xyvnS03zjJU5uK3qcIIvHzzvrU0x2sO8lIr1fT6e5+JOb+D/5aMdSXer8XZDcSEB9gVpyL5NPc\n MBmbO9wRCKt3+xljODg==","X-Proofpoint-GUID":"c-4pnE-KqL5cD9Mfnncxa5T1iT8Tsbtd","X-Proofpoint-ORIG-GUID":"oe5is6RcB1_lAwEYSIuPMTvT2NfoBLQ2","X-Authority-Analysis":"v=2.4 cv=MohiLWae c=1 sm=1 tr=0 ts=69eeea6f cx=c_pps\n a=aDMHemPKRhS1OARIsFnwRA==:117 a=aDMHemPKRhS1OARIsFnwRA==:17\n a=A5OVakUREuEA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22\n a=Y2IxJ9c9Rs8Kov3niI8_:22 a=VnNF1IyMAAAA:8 a=sK8o6yvm1_ZMHGIy4kUA:9","X-Proofpoint-Virus-Version":"vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-04-27_01,2026-04-21_02,2025-10-01_01","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n phishscore=0 adultscore=0 suspectscore=0 bulkscore=0 spamscore=0\n priorityscore=1501 malwarescore=0 clxscore=1015 lowpriorityscore=0\n impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc=\n route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000\n definitions=main-2604270048","X-Spam-Status":"No, score=-0.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tRCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,\n\tSPF_PASS autolearn=disabled version=4.0.1 OzLabs 8","X-Spam-Checker-Version":"SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org"},"content":"First online CPU in the node disables the nest counters by\nmaking an OPAL call. Any other CPU in that node, will bail out.\n\nInstead of using a temporary mask to find out if any cpu in the\nnode is visited or not, it is better to use the cpumask_intersects\napi to achieve the same.\n\nSimilarly a temporary cpumask is used to check if a core is already part\nof core_imc_cpumask. Use the same cpumask_intersects api there.\n\nSigned-off-by: Shrikanth Hegde <sshegde@linux.ibm.com>\n---\n arch/powerpc/perf/imc-pmu.c | 6 ++----\n 1 file changed, 2 insertions(+), 4 deletions(-)","diff":"diff --git a/arch/powerpc/perf/imc-pmu.c b/arch/powerpc/perf/imc-pmu.c\nindex c1563b4eaa94..e3822f36c419 100644\n--- a/arch/powerpc/perf/imc-pmu.c\n+++ b/arch/powerpc/perf/imc-pmu.c\n@@ -421,7 +421,6 @@ static int ppc_nest_imc_cpu_offline(unsigned int cpu)\n static int ppc_nest_imc_cpu_online(unsigned int cpu)\n {\n \tconst struct cpumask *l_cpumask;\n-\tstatic struct cpumask tmp_mask;\n \tint res;\n \n \t/* Get the cpumask of this node */\n@@ -431,7 +430,7 @@ static int ppc_nest_imc_cpu_online(unsigned int cpu)\n \t * If this is not the first online CPU on this node, then\n \t * just return.\n \t */\n-\tif (cpumask_and(&tmp_mask, l_cpumask, &nest_imc_cpumask))\n+\tif (cpumask_intersects(l_cpumask, &nest_imc_cpumask))\n \t\treturn 0;\n \n \t/*\n@@ -647,14 +646,13 @@ static bool is_core_imc_mem_inited(int cpu)\n static int ppc_core_imc_cpu_online(unsigned int cpu)\n {\n \tconst struct cpumask *l_cpumask;\n-\tstatic struct cpumask tmp_mask;\n \tint ret = 0;\n \n \t/* Get the cpumask for this core */\n \tl_cpumask = cpu_sibling_mask(cpu);\n \n \t/* If a cpu for this core is already set, then, don't do anything */\n-\tif (cpumask_and(&tmp_mask, l_cpumask, &core_imc_cpumask))\n+\tif (cpumask_intersects(l_cpumask, &core_imc_cpumask))\n \t\treturn 0;\n \n \tif (!is_core_imc_mem_inited(cpu)) {\n","prefixes":["v2","3/4"]}