From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Philippe Brucker Subject: Re: [PATCH v2 39/40] iommu/arm-smmu-v3: Add support for PRI Date: Tue, 29 May 2018 11:27:33 +0100 Message-ID: <4e36ddb0-f1c3-f434-d330-be2dc9b88bb8@arm.com> References: <20180511190641.23008-1-jean-philippe.brucker@arm.com> <20180511190641.23008-40-jean-philippe.brucker@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Bharat Kumar Gogada , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" , "linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org" , "kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org" Cc: "xuzaibo-hv44wF8Li93QT0dZR+AlfA@public.gmane.org" , Will Deacon , "okaya-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org" , "ashok.raj-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org" , "rfranz-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org" , Ravikiran Gummaluri , "ilias.apalodimas-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org" , "dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org" , "christian.koenig-5C7GfCeVMHo@public.gmane.org" List-Id: iommu@lists.linux-foundation.org On 25/05/18 15:08, Bharat Kumar Gogada wrote: >> + master->can_fault = true; >> + master->ste.prg_resp_needs_ssid = >> pci_prg_resp_requires_prefix(pdev); > > Any reason why this is not cleared in arm_smmu_disable_pri ? Actually, setting it here is wrong. Since we now call enable_pri() lazily, prg_resp_needs_ssid isn't initialized when writing the STE. That bit is read by the SMMU when the PRIQ is full and it needs to auto-respond. Fortunately the PRI doesn't need to be enabled in order to read this bit, so we can move pci_prg_resp_requires_prefix() to add_device() and clear the bit in remove_device(). Thanks for catching this. Jean