From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796402610; b=emXkhPLWSXWawPA6qLhPcomn3aGtPjqw+SHFmp+16LPX4abGxOtuMgn/dNEFqUsgb+Ek 6xDQI4M3LVhiKOUBe1Pw+HPZBgM8aFmMTqFXrUW2Tc/4d7Yp1V85yiLA5O6NEsMz3Rq/m jw1r9xsPXkLuaoIgTfQ0txAamS4S0TfDlv4GiLRxd9PLA24RrpdwydQdqU745DSkAgMlv KKm79mfd3zJTx9cZ+6ZYqce1TMsrg1yO3Oar/6HiKYtjPl65RZPtmjpQ9bHewqaMxr/Yn C6XWZ47DWxBmINKEmqxApkTpEMfCsHW2dtqYaNHxmtbeXrPDYJzqbE3RPq5P6LHSGRw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796402610; h=DMARC-Filter:Received:DKIM-Signature:Received:Received:Received: Received:Received:Received:Received:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-TM-AS-GCONF:X-Proofpoint-Reinject: X-Proofpoint-ORIG-GUID:X-Proofpoint-GUID: X-Proofpoint-Spam-Details-Enc:X-Proofpoint-Spam-Info: X-Authority-Analysis:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=zcpe536tfFLAfiPFIgqqWZZumy8bTGQlmdJQseM2hfk=; b=OtszbVjY/UNemaA3/pSHGbQKpdf+z9ITQi0I3MhtaJm9CrWovST1eQ4f8WzgcCd8NgjG p/mi+rIKPDlyWYnWSlhaqWRKsbsSg9O9UnDzd1tYPFXqWMVZvARQkeW8Jwv/StyZRfZmQ MvtdHT7fyBisE7/Q4hVMciBA/vegzn+v7mamUzt66N/UwqVWHokQKUuherPr/b+968Edx ffftKAKfF877292n75wZDANRbzq2gz3GGEZIOkgz7/wtBB/bZlA0+2ZZ9z7VZiH1aZwRV 0daUdwxsMz+Fb3qRR4mhYWVNRuEblMq9zR1jL47NBAseB/sR/UImKTlbpdjy04usDgQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=FfVHHlhb; arc=none smtp.remote-ip=148.163.158.5 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 997CB606A322; Fri, 4 Dec 2026 16:43:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 997CB606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=FfVHHlhb Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B4EYgBn2350539; Fri, 4 Dec 2026 16:43:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=zcpe536tfFLAfiPFI gqqWZZumy8bTGQlmdJQseM2hfk=; b=FfVHHlhbtMK32jdiFYEmo5HZ1NPIT2QVs qF3aFOjcTYQyfDo/U9BZTdfJb2HbosiKY5emsAXsVXfKFP9mOa+h/EODkRAajluE bbZXRbU6apudSqbwaEmg2E6uVnio/MApihyXoAr15NTK738KN7iXnQWVyaJF4X3r 290gCKREOfD+TJpKVSwR/j8sh5aBmFxVRCDzPk+fyLDP9/CdyUxKfGk2inx7HWuo LleW6mK1WA/WbdYpayRRaXxgTTeVCkAels/Fm+9i8slO65cEOu3qNR2myA1KxBNW kLu8OTJiAXd804zxl6EDZ0Z7xB/rFhwExaA4TVUIjV0RTeGxq1KSA== Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4jbqghjrcx-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 04 Dec 2026 16:43:02 +0000 (GMT) Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.18.1.11/8.18.1.11) with ESMTP id 6B4EYSrJ3352542; Fri, 4 Dec 2026 16:43:01 GMT Received: from smtprelay05.dal12v.mail.ibm.com ([172.16.1.7]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4jbnggjt4j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Dec 2026 16:43:01 +0000 (GMT) Received: from smtpav04.dal12v.mail.ibm.com (smtpav04.dal12v.mail.ibm.com [10.241.53.103]) by smtprelay05.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 6B4Gh0Rl28639884 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 4 Dec 2026 16:43:00 GMT Received: from smtpav04.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6702658067; Fri, 4 Dec 2026 16:43:00 +0000 (GMT) Received: from smtpav04.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A708858065; Fri, 4 Dec 2026 16:42:49 +0000 (GMT) Received: from Narayanas-MacBook-Pro.ibm.com (unknown [9.124.213.150]) by smtpav04.dal12v.mail.ibm.com (Postfix) with ESMTP; Fri, 4 Dec 2026 16:42:49 +0000 (GMT) From: Narayana Murty N To: Madhavan Srinivasan , Bjorn Helgaas , Thomas Gleixner Cc: Michael Ellerman , Nicholas Piggin , Christophe Leroy , Ritesh Harjani , Shrikanth Hegde , Radu Rendec , sbhat@linux.ibm.com, harshpb@linux.ibm.com, gautam@linux.ibm.com, Nam Cao , Nilay Shroff , Vivian Wang , Shawn Lin , "Rafael J . Wysocki" , Jonathan Cameron , Lorenzo Pieralisi , Farhan Ali , Haoxiang Li , Yuanhe Shu , Vidya Sagar , Hans Zhang <18255117159@163.com>, Miles Krause , Randy Dunlap , linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] powerpc/pseries/msi: Release RTAS MSI state on vector disable Date: Fri, 4 Dec 2026 22:11:44 +0530 Message-ID: <20261204164141.20530-6-nnmlinux@linux.ibm.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20261204164141.20530-4-nnmlinux@linux.ibm.com> References: <20261204164141.20530-4-nnmlinux@linux.ibm.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Reinject: loops=2 maxloops=12 X-Proofpoint-ORIG-GUID: hGrQux9r8Op0s2VPVTjmVbURBgcg_sw- X-Proofpoint-GUID: QvWHFcla_QEGY45a1hSGt5CIS7_6ItM5 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjA0MDA2NiBTYWx0ZWRfX0KvlESUYW5qS 7O/5YpnYo7D2qKNkxfuuthmg7IW0FjiVsV8dEmolb7CC5zVqksWY7ok5/5q5Dmsfhjh8TLuCPi9 SK2nyaaUfIWeGpUElnw0oKH9veaz+Nr90Q3P5dI0aoqxvVGeMKCf0W8d7LF3rl7NxchGHEQpTbp omacwopx73Wmki9SOUGh6Ld0S3aBHbB9N8ON21K/CODSu7cRewi6YO+jGgHTDMN2zW//YyMTpD/ YemxoM3f7dZJ9LpUH2LL+yM3/s7FUbPtOGpPRudEbqTZay7Jq4D8YEjQkpGZoxOP+p1odT1NYs9 xx2734JBeqyv0ArRfFo0axzo4ThNiBOK9zIlGv5qX6vtx8+TUwjnHvoOYMfRkBI75YMCoxhEE7e BKcR2dScHmmga6EHeh5WPn8u3vSywEhn8t8dvUKNfv13zaLB/LPV8yJZ1yYzRBDwnGC8c49mW77 8nKnu5JiqWCF0QjvNZw== X-Proofpoint-Spam-Info: AW1haW4tMjYxMjA0MDA2NiBTYWx0ZWRfX1aqTYEbHLxw6 vDi8I6hMTXqdhHslH1/67Su2GF+/wTBcON6kUL76wg231/tHT3SyQMp8Tgu390MWnBBXWOp8RPa n0LPXcI1GJeT+52Fab4ntBot5GzyIpk= X-Authority-Analysis: v=2.4 cv=Uc7E26SN c=1 sm=1 tr=0 ts=6b12ed96 cx=c_pps a=3Bg1Hr4SwmMryq2xdFQyZA==:117 a=3Bg1Hr4SwmMryq2xdFQyZA==:17 a=pUM-KoujPXoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=Y2IxJ9c9Rs8Kov3niI8_:22 a=VnNF1IyMAAAA:8 a=T2EeNFO0l1QmgEMJscYA:9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-04_03,2026-12-03_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 adultscore=0 lowpriorityscore=0 clxscore=1011 priorityscore=1501 phishscore=0 malwarescore=0 suspectscore=0 impostorscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612040066 Before commit daaa574aba6f ("powerpc/pseries/msi: Switch to msi_create_parent_irq_domain()"), pSeries released its RTAS MSI configuration from the legacy msi_post_free() callback when the MSI or MSI-X vectors were freed. The conversion to hierarchical MSI domains moved that release into msi_ops->msi_teardown(), which runs when the per-device MSI domain is destroyed. The PCI/MSI core normally retains that domain across a complete vector disable, so freeing the vectors no longer necessarily calls rtas_disable_msi(). A later allocation can reuse the existing domain and skip msi_ops->msi_prepare(), leaving the RTAS configuration unchanged even when the device has been reset or reconfigured between allocations. Set MSI_FLAG_PCI_MSI_TEARDOWN_DOMAIN for pSeries. This causes the device MSI domain to be destroyed after normal vector disable or a terminal enable failure. Domain teardown releases the RTAS configuration, and the next allocation creates a fresh domain and runs RTAS preparation again. Internal retries with fewer vectors continue to reuse the prepared domain. Fixes: daaa574aba6f ("powerpc/pseries/msi: Switch to msi_create_parent_irq_domain()") Signed-off-by: Narayana Murty N --- arch/powerpc/platforms/pseries/msi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c index 8285b9a29fbf..6d5b1799c5b7 100644 --- a/arch/powerpc/platforms/pseries/msi.c +++ b/arch/powerpc/platforms/pseries/msi.c @@ -517,7 +517,8 @@ static bool pseries_init_dev_msi_info(struct device *dev, struct irq_domain *dom #define PSERIES_PCI_MSI_FLAGS_REQUIRED (MSI_FLAG_USE_DEF_DOM_OPS | \ MSI_FLAG_USE_DEF_CHIP_OPS | \ - MSI_FLAG_PCI_MSI_MASK_PARENT) + MSI_FLAG_PCI_MSI_MASK_PARENT | \ + MSI_FLAG_PCI_MSI_TEARDOWN_DOMAIN) #define PSERIES_PCI_MSI_FLAGS_SUPPORTED (MSI_GENERIC_FLAGS_MASK | \ MSI_FLAG_PCI_MSIX | \ MSI_FLAG_MSIX_CONTIGUOUS | \ -- 2.54.0