From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 62C2C2D0C68 for ; Tue, 10 Feb 2026 13:15:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770729329; cv=none; b=C0RmSfedWHvaImsmG4j+cgU0Q76Ses3iQrgWxHUwNZ8Hka6GPlcoHMsZvt1/XGBh3Xy0iCL8IusePn+ChUFeAEbbaLDM8PXmo0KjHtH+3PBGCOFzoRbvKahWcbs4I7doJcrO629n55FXDuyzYM6Ql1J7KzEwt0DbOE24Fx9ZOpI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770729329; c=relaxed/simple; bh=F8w4PX3YR2LBUt2iuysbbtlPZH7MbKvPtV4LF1y5x4I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DSWMeIVgdte4qkPLHUYjvUeVJFwXFpRDnaveuGLWAv0GLrDg78ctcS5YQ+u/Z2jB+a6jGAPFnCzjX/O9LNpmsTXNXr4jb5y3v4EB61WhBNzY0xAN+iIEbVyCTPdT/Nl3qsB7pD0ErQPdTDpWzYAKO6u6+ADshNBN0iVkOGplphU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=p2qju3Ph; arc=none smtp.client-ip=209.85.214.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="p2qju3Ph" Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-2a885af8ee7so59355ad.1 for ; Tue, 10 Feb 2026 05:15:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1770729328; x=1771334128; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=RX56B6Pzw6O0Q1rKBSh+0V8lVIPD4tWbCrOnzMgOsgU=; b=p2qju3PhRC0LB8IEa8ZLOGaoodB0u4OLGI7gNNiS7NMvZzr09mmsTCqbRDrLspuU1k kkK0pT1px18igpydupwK1d1r6c/bJdU5b73ijBMt1nkzGbcLtFG+/O7EYdPOqWAyxTx0 w2SaEEDubvSACWfLa6aRBuxGlwzyIVaFfFC4fsJwmjsEwcKGCSZh2HuX0hrfXUzLAp/U +/wKuwgEPImr85kAVkFV/WRliz45kWnN3IU698svmNyWrObADtET/hyqreUej367lZXX NYSmWrjF6f9MBSxkYI5vrLGHT97FkF4OVHeduo2ecxIXYEdjJVKe81z01nYFcs1XlisE On+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770729328; x=1771334128; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RX56B6Pzw6O0Q1rKBSh+0V8lVIPD4tWbCrOnzMgOsgU=; b=Al3bj6pzva2udE55/e2gd1OlvJPAWZVIMoCtvAAtrM+PRtBUGb1KJn52qf45B8GpQg qcxAnO+LEvoRLoESRahjRN2wqTAV/VKVM0xYhJJtNLXAfzNEFSutSJRWdnMFiicUPNKp dS5z+mfHC10S8lIrT3qNvPwRQqokJv/x7ZWplFnH2xUM46pkJ3VV9G5A2NRrqka5vGxl AXpFIX7SC8DHt6uPOBF+PWgUjyfTWO2sgC3YqFob413Bt4aGnLMnynCRemPXacU4vrHw nQOpNLUJbX64GEZjVnSHWjLH6ZwjXZ5XlxvDCLjJb5skixhIYYGWyLPJrVATsoXX6vFT SmIg== X-Forwarded-Encrypted: i=1; AJvYcCVRZbLfeCW9H/M3bdqbbeDSsv2UM+4h2lZhAIaloN6q3MF2egjo5sr41j4KTtzn4EDV1Gw5nYWQXmRIvag=@vger.kernel.org X-Gm-Message-State: AOJu0YxYyqZ/SkME7LsqseWc+yLE00U6/NdwKyOoFK3nFF4qbteXJE0p OBzy0Dcd2FJQGSguAVF5W3a6w4cCHXiOzPeyV63p0na+B4FbjCIyg2dSNm6c0H6V88wY5W9MXfA A8ZHixQ== X-Gm-Gg: AZuq6aKIs03VyM5BCqXyt1U3X9asmxPSqM2x7kMx0VI/yWF8y6K3VIQ68M1FeQvcRSJ iYGbn/HCA1iu9jno2zsTOzKgDxoF9OAsopHF/08z160HoN0K333ryuWihFRdB3ByXWcLOCh9jpB kuokkKrIfeg6jEbxCBtMeda/NBNQ3fO38r14vFE3/TI05PSUvhYQ5SnNsp2MpGVPU5pMinIW32y Dkad7v0/aSV27yn/rNRQ39zDwzXOShMatvga5B9fqIkOEL6exIuRSvW2GmmnFPe8qTUT8m5K0Kc zbfGg1QPJREbh0p8SDsI1qWLGmwqyMX2ElJki/HJ6j5SjgDG52pS0lQFJwsUhmRnIRdfL7+2qTG OFpewoHr0LnAfjOSkOyj6uE+QGhqFRkbGHZEI3jbUvR5Apch39gR0ERttOnWWSul5yagkrMHSwl ZT2gtDp2qpnroQek3uFoLGBnO5GI0Xc2AKyTTDwxb56vl26Pt2fCWXaWK8Y9Fg X-Received: by 2002:a17:903:32cf:b0:2a7:d266:d84a with SMTP id d9443c01a7336-2ab10104509mr2092735ad.17.1770729327080; Tue, 10 Feb 2026 05:15:27 -0800 (PST) Received: from google.com (222.245.187.35.bc.googleusercontent.com. [35.187.245.222]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-824418dd7a2sm13128886b3a.59.2026.02.10.05.15.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Feb 2026 05:15:26 -0800 (PST) Date: Tue, 10 Feb 2026 13:15:21 +0000 From: Pranjal Shrivastava To: Prakash Gupta Cc: Robin Murphy , Will Deacon , Joerg Roedel , Rob Clark , Connor Abbott , linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Akhil P Oommen , Pratyush Brahma Subject: Re: [PATCH] iommu/arm-smmu: Use pm_runtime in fault handlers Message-ID: References: <20260127-smmu-rpm-v1-1-2ef2f4c85305@oss.qualcomm.com> <9fb8f661-a235-4f86-bc10-f80a21a8fa9d@arm.com> <00fcbcf2-3f48-410d-88a3-88dc834c1ed7@oss.qualcomm.com> <7720d215-9f92-4f0f-83af-c992e1cbe531@oss.qualcomm.com> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7720d215-9f92-4f0f-83af-c992e1cbe531@oss.qualcomm.com> On Tue, Feb 10, 2026 at 04:39:56PM +0530, Prakash Gupta wrote: > > > On 2/3/2026 1:44 AM, Pranjal Shrivastava wrote: > > On Wed, Jan 28, 2026 at 06:44:35PM +0000, Robin Murphy wrote: > >> [ +Pranjal as this might matter for v3 too... ] > >> > > > > Hi Robin, > > > > To weigh in from the arm-smmu-v3 side, we’ve attempted to address the > > "can of worms" regarding power races by leaning on these differences: > > > > - Threaded IRQs for PRI/Events: In the recent series[1], the PRI and > > event handlers are fully threaded. This allows us to call > > arm_smmu_rpm_get() safely, as the handler can sleep while waiting for > > the hardware to resume. > > > > - GERROR Handling: Since GERROR remains a hard IRQ, we handle any > > pending gerrors in the suspend callback before the SMMU actually > > powers down. Any GERROR interrupts received while the device was > > suspended are treated as spurious and ignored. > > > > Thanks, > > Praan > > [1] refer to case where SMMU state is not retained during smmu device > power down, this I think is equally applicable for both context and > global faults. > > Since the ARM SMMU runtime resume triggers a device reset, any pending > faults would be cleared during resume. Here the solution can be to > handle both global and context faults before allowing the SMMU device to > suspend. > With this approach, any hard or threaded IRQ scheduled after the SMMU > device has suspended can be safely ignored. > One concern I see is iommu fault reporting to clients while handling > fault during smmu device suspend. I believe by the time we've reached suspend it's safe to assume that all clients have been suspended. Thus, we could simply not report the error and instead scream by having a dev_warn_ratelimited about the situation. Thanks, Praan > > Thanks, > Prakash > > [1] https://lore.kernel.org/all/20260126151157.3418145-9-praan@google.com/ >